Forum Discussion
IF Function
- Anonymous8 years ago
I figured it out!!!! I had to make my expression a measurement and not a calculated column!!!! So embarassed thank you for your help~!
Hey,
I assume that Unit Level is also a calculated column.
Put the expression inside a CALCULATE( ... ) this should solve your problem.
Using SUM(...) means always aggregate the available rows of the table considering the current Filter Context.
Definig a calculated column one has to consider that there is no Filter Context, just a Row Context. This means using SUM(...) aggregates all the rows, for this reason you just have "Gold".
Two possibilities
- Wrap CALCULATE around the expression. CALCULATE( ) introduces a Filter Context. Using CALCULATE() inside a Row Context means, the Filter Context is just the current row, this of course can be changed by adding more than just the 1st parameter - the expression.
- Remove the SUM()s from your expression, to reference a value from a certain column inside a Row Context it's not necessary to use SUM
Hope this helps
Hey,
this will resolve the error message
CALCULATE(
< your expression >
,ALLEXCEPT('yourtablename', 'yourtablename'[name of the calculated column 1])
)
Regards Tom