Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi I am trying to calculate the moving range to make an SPC chart using a measure. However with my calculation I am currently using the moving range includes the first value which I never want to include.
What I want to know is how do I ingore that value when calculating the moving range.
Moving Range =
VAR EarlierTime =
CALCULATE (
MAX ( 'Data sheet'[Date] ),
FILTER (
ALLSELECTED('Data sheet'[Date]),
'Data sheet'[Date] < SELECTEDVALUE ( 'Data sheet'[Date])
)
)
VAR EarlierMeasureValue =
CALCULATE ( SUM ( 'Data sheet'[Value] ), 'Data sheet'[Date] = EarlierTime)
RETURN
ABS ( EarlierMeasureValue - SUM ( 'Data sheet'[Value] ))
Hi @JamesHR ,
You can create a ranking column for your values and then filter out the first value you don't want in your original measure formula.
Power BI RANKX | How to Use RANKX Function
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
84 | |
79 | |
62 | |
62 | |
51 |
User | Count |
---|---|
109 | |
95 | |
86 | |
79 | |
61 |