Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Adding Statistics like Standard Deviation, Upper Control Limits, Lower Control Limits to Line Chart

Hi Everyone,

 

What's the easiest way to add Standard deviation, Upper Control Limits (average + 3* the standard deviation), Lower Control Limits (average - 3* the standard deviation) on a line chart with date heirarchy? Anyone know optimized DAX instead of custom visual.

  • parry2k's avatar
    parry2k
    6 years ago

    Anonymous change ALL to ALLSELECTED and I think that will do it.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

5 Replies

  • Anonymous you can create measures for upper and lower limit and use that in your line visual?

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    hi Anonymous 

    Create two measure as below:

    Lower Control = CALCULATE(AVERAGE('Table'[Value]),ALL('Table')) -3*CALCULATE(STDEV.S('Table'[Value]),ALL('Table'))
    Upper Control = CALCULATE(AVERAGE('Table'[Value]),ALL('Table')) +3*CALCULATE(STDEV.S('Table'[Value]),ALL('Table'))

    Then drag the two measure into line value 

     

     

    Regards,

    Lin

    • Anonymous's avatar
      Anonymous
      Not applicable

      This is working but how do I make the UCL and LCL dynamic based off of if a user is looking at chart with a date heirarchy. Currently this is giving me the UCL and LCL for the overall but when I drill down on a monthly or weekly level, the UCL and LCL does not change -

      • parry2k's avatar
        parry2k
        Super User

        Anonymous change ALL to ALLSELECTED and I think that will do it.

         

        I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

        Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.