Forum Discussion
Plot Weighed Average
Hi, I am new to Power BI. I need to plot the weighted average of the price over several regions for one customer vs. time. How can I so this?
I am providing a hypothetical sample table. I want to plot the average price of product (average / All regions and all sales managers) vs. Year for one customer. The actual data containes many other variables.
| Year | Customer name | Region | Sales manager | Product | Variable 1 | Variable 2 | Variable 3 |
| 2010 | A | NA | Tom | X | |||
| 2010 | A | EU | Sam | Y | |||
| 2010 | B | EU | Kay | Y | |||
| 2011 | A | EU | Tom | X | |||
| 2011 | B | NA | Kay | Y | |||
| 2011 | B | EU | Kay | Y | |||
| 2012 | A | EU | Bob | Y | |||
| 2012 | B | NA | Dan | X |
this turned out to be very easy. I bascially created a new measure = sum of price / sum sales. When plotting, Power BI does the averagin over the relevant category depending on what category I use in the plot.
4 Replies
- FowmySuper User
Can you share the expected results as well?- MOMOMOFrequent Visitor
this turned out to be very easy. I bascially created a new measure = sum of price / sum sales. When plotting, Power BI does the averagin over the relevant category depending on what category I use in the plot.
- v-lionel-msftCommunity Support
Hi MOMOMO ,
Please refer to how to calculate the weighted average with DAX.
Power BI Weighted Average and Totals ā Simplify Power BI
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- MOMOMOFrequent Visitor
thanks but this did not adress my issue.