Forum Discussion
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.
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
- parry2kSuper User
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.⚡
- AllisonKennedyCommunity ChampionNot sure what the problem is, have you tried the DAX STDEV functions? https://dax.guide/stdev-p/
- v-lili6-msftCommunity 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
- AnonymousNot 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 -
- parry2kSuper 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.⚡