Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a measure calculated to find the value of a data set two standard deviations above the median:
I then attempt to compare the cycleTime to the Median From 2StdDev for each row to find which cycle times are above the Median From 2StdDev values using and IF statement. However, it seems that because the comparison is being done on a row by row basis, the Median From 2StdDev in the IF statement becomes calculated for each row rather then the whole dataset filtered by cycleTime < 90 min and selected shiftNames. Therefore I can't make the comparison.
The closest I can get is the following IF statement:
I have both an ALLEXCEPT and a FILTER applied in the CALCULATE statement trying to force the Median From 2StdDev Measure to use the whole dataset. The ALLEXCEPT and FITLER each work separately, but when applied together, the FILTER seems to overwrite the effects of the ALLEXCEPT.
What would be the best way to compare a calculated measure to individual rows in a table without having the measure recalculated for each row?
@Anonymous ,
You may modify the measure using dax below:
Cycle Time 2StdDev =
IF (
Edge_Cycles[cycleTime]
> CALCULATE (
Edge_Cycles[Median From 2StdDev],
FILTER (
ALLEXCEPT ( Edge_Cycles, Edge_Cycles[shiftName] ),
Edge_Cycles[cycleTime] < 90
)
),
1,
0
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Your modification works for a comparision with each separate shift, but does recalculate considering data from all selected shifts. Your solution is acceptable for the report I am building, but does not answer my specific question above.
I modified your function to display the Median From 2StdDev instead of 1 when True. This shows that the Calculated Median From 2StdDev is being split by shift:
Ideally, the cycleTime for each row would be compared against the Median + 2 Std Deviations calculated for the entire filtered dataset. It would adjust as new shifts are selected and the same value would apply for all rows:
Instead, the Median + 2 Std Deviation calculation is split by shift as explained above.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
85 | |
66 | |
52 | |
47 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |