Forum Discussion
Standard deviation across the entire range
Hello Guys,
New to Power BI so please excuse me if my question sounds strange.
I was looking for a way to store a global variable that can be used across a report let me explain.
We have profit per customers and want to be able to show customers whose profit falls outside the standard deviation. I can calculate the deviation no problem, however the issue arises when i want to try visualise it.
Power BI seems to calculate the standard deviation for each customervinstead of across the entire range. so when we place this measure in as line on a graph,the graph shows how the customers prices deviated as opposed to the entire set.
I have played around with storing the standard deviation in a table on its own, which works, however it is not dynamic, i.e. not affected by slicers on the dashboard.
Hopefully someone can help, if you need anymore info from me please ask.
Ronan
Hi rockonron,
Based on my understanding, you want to add a line in a column chart to display standard deviation values for all profits, right?
In your scenario, you can create a measure use STDEV.P( ) function like below:
Standard deviation = CALCULATE( STDEV.P(Sheet4[profit]), ALLSELECTED( Sheet4[customer]) )
Then place this measure in Line values property like below:
If you have any question, please feel free to ask.
Best Regards,
Qiuyun Yu
2 Replies
- v-qiuyu-msftCommunity Support
Hi rockonron,
Based on my understanding, you want to add a line in a column chart to display standard deviation values for all profits, right?
In your scenario, you can create a measure use STDEV.P( ) function like below:
Standard deviation = CALCULATE( STDEV.P(Sheet4[profit]), ALLSELECTED( Sheet4[customer]) )
Then place this measure in Line values property like below:
If you have any question, please feel free to ask.
Best Regards,
Qiuyun Yu- rockonronFrequent Visitor
Thanks v-qiuyu-msft thats perfect, have applied it to some test data and seems to work as planned.