Forum Discussion
blueshell
6 years agoNew Member
Weighted average line chart instead of simple average
Hi everyone, wanted to ask if it is possible to show a weighted average line instead of simple average in "Line Chart"?
Currently in the analytics pane of the visual, we can show simple average line on line chart. However, I want a line that represent the weighted average instead of the simple average. Is it possible to do?
We do weighted average in almost every chart we generate, wish Power BI has this funtion built in...
below is the data:
| Month | Sales | Score | sale x score |
| January | 949,800 | 7 | 6,648,600 |
| January | 458,400 | 10 | 4,584,000 |
| January | 903,800 | 6 | 5,422,800 |
| February | 1,135,800 | 8 | 9,086,400 |
| February | 505,800 | 4 | 2,023,200 |
| February | 1,503,100 | 8 | 12,024,800 |
| March | 1,607,600 | 5 | 8,038,000 |
| March | 1,288,900 | 7 | 9,022,300 |
| March | 250,000 | 9 | 2,250,000 |
I like the line chart show "weighted average score" dynamicly...
| Month | average score | weighted average score |
| January | 7.67 | 7.20 |
| February | 6.67 | 7.36 |
| March | 7.00 | 6.14 |
Thanks!
blueshell should be easy, try following
Add new column
Sales x Score = Table[Sales] * Table[Score]Add following measure for Avg
Weighted Avg = DIVIDE ( SUM ( Table[Sales] ), SUM ( Table[Salex x Score] ) )
5 Replies
- linettedavisNew Member
How can we bring in a "Weighted Average" measure into a line or bubble chart?