-1

I am trying to calculate the alphabetic grade based on the product of the column weight and the sum of count.

I had the following dax code:

weight = IF ( CONTAINSROW ( {"FirstName", "LastName", "Birthdate"}, table[columns]), 2, 1 )

after the above, I used it to multiply with the count

weightedvalue = table[count] * [weight]

But I get the following error:

A single value for column 'Weight' in table 'table' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

Here is the sample table: count refers to the count of valid entries

columns  | count
FirstName|    25
LastName |    20
BirthDate|    10

after the weightedvalue, I use it as a denominator to find the percentage of valid scores.

budding pro
  • 135
  • 1
  • 2
  • 10

1 Answers1

0

Your weight and weightedvalue formulas need a row context, so you have to enter them as Calculated Columns, not as Measures.

enter image description here

Peter
  • 10,959
  • 2
  • 30
  • 47