Forum Discussion
Anonymous
4 years agoNot applicable
Adding two measures within an IF statement
Help! I'm trying to create a calculated column using an IF statement and need to add together 2 measures and compare the points value. Both measures are based on the "Points" column. The standard dev...
- 4 years ago
The standard deviation and average measures are being computed in the current row context, they are not being computed against the whole dataset.
You'll need something like
Tier = VAR _stdDev = CALCULATE ( [Standard deviation], ALL () ) VAR _avg = CALCULATE ( [Average], ALL () ) RETURN IF ( 'ASG Contribution Points'[Points] > ( _stdDev + _avg ), "S", "V" )
Anonymous
4 years agoNot applicable
johnt75
4 years agoSuper User
Looks like stdDev and avg are reserved words in DAX, even though they're not function names. Just put an _ before them. I'll edit my original post to include that
- Anonymous4 years agoNot applicable
that worked, thank you!