Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
8
9
10
Measure = STDEV.P(Test[Number]) - which gives a Standard deviation value of 2.87
I have now a calculated column that checks to see iff each of the values in the number column is greater than or less than the Standard Deviation calculated in the measure using this formula;
LogicalTest = IF(Test[Number]<[Measure], "Less", "Greater")
But the resulting table looks like this;
Why is it evaluating each row value as "Greater"? Surely values 1 and 2 should show "Less"
See the PBI file below:
https://www.dropbox.com/s/kyrfej1luf8uwan/MeasureVsColumn.pbix?dl=0
Solved! Go to Solution.
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")
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?
If you want to keep the original measure you can use
LogicalTest_ = IF(Test[Number]<CALCULATE([Measure],ALL(Test)), "Less", "Greater")
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |