Forum Discussion
Anonymous
7 years agoNot applicable
Evaluate row value to measure - simple example
Hi, Im trying to evaluate each column value agaisnt the measure but cant seem to figure out why it is struggling. A very simple 1 column table (Test); Number --------- 1 2 3 4 5 6 ...
- 7 years agoUsually, measures adapt according to the scope it is used for, so it will change to the standard deviation of the current row being evaluated and will always give an incorrect result. To overcome this you need to fix the calculation to estimate the value over all the values in the column. Use this one: STD = calculate(STDEV.P(Table1[Number]),ALL(Table1[Number])) Then do your check against this measure.
Zubair_Muhammad
Community Champion
7 years agoAnonymous
Measures transform row context to Filter context
So your STDEV.P gets calculated for each individual row in above formula
Try
LogicalTest = IF(Test[Number]<STDEV.P(Test[Number]), "Less", "Greater")
- Anonymous7 years agoNot applicable
Thanks for that.
The only issue I have is that the Standard deviation needs to be stored as a measure. And from there it needs to evaluate each row to that measure value. Can this be achieved anyhow?
- Zubair_Muhammad7 years ago
Community Champion
Anonymous
If you want to keep the original measure you can use
LogicalTest_ = IF(Test[Number]<CALCULATE([Measure],ALL(Test)), "Less", "Greater")
- Anonymous7 years agoNot applicable
Thank you both Zubair_Muhammad and yelsherif this worked :smileyhappy: