cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Average of Measure

Hi, 

 

Need help on DAX to calculate Average for below measure. 

 

DAX for the measure is below. 

MovingRange = 
IF(ISBLANK(data1[EarlierTime]);blank();(
VAR EarlierTime = CALCULATE ( MAX ( data1[TimeSPC] ); FILTER ( ALLSELECTED ( data1[TimeSPC] ); data1[TimeSPC] < SELECTEDVALUE ( data1[TimeSPC] ) ) ) 
VAR EarlierMeasureValue = CALCULATE ( SUM ( data1[MeasureValue] ); data1[TimeSPC] = EarlierTime ) 
RETURN ABS ( EarlierMeasureValue - SUM ( data1[MeasureValue] ) ) ))

End goal is to calcuate Sigma, = MRbar/1.128.

- MRbar= Average of Moving Range.

- 1.128 is a constant.

 

Sample Pbix file

https://1drv.ms/u/s!ArjVwEnHONXNghx02BIdTGGtSrlZ

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Average of Measure

Answer:

MRBar = AverageX(ALLSELECTED(data1[TimeSPC]);[MovingRange])
1 REPLY 1

Re: Average of Measure

Answer:

MRBar = AverageX(ALLSELECTED(data1[TimeSPC]);[MovingRange])