Forum Discussion

a_hawk's avatar
a_hawk
Frequent Visitor
4 years ago
Solved

DAX: Moving Range Average & Standard Deviation

Hello.  I am trying to build I-MR charts on the month level and am having difficultly getting the average & standard deviation of my "Moving Range" measure.   Here is a sample of the excel data I ...
  • Whitewater100's avatar
    4 years ago

    Hello:

     

    You can try this for your answer of 8.8%. 

     

    Avg Range  =
    VAR _mytable = SUMMARIZECOLUMNS(
    'Date Table'[Month],'Date Table'[Year],
    "ratio", [Ratio],
    "LastMonthRatio", [Ratio Last Month])
    return
    AVERAGEX(_mytable,
    ABS([ratio] - [Ratio Last Month])
    )
     
    I beleive the same approach will handle Standard Dev.
     
    I hope this helps!