Forum Discussion
Creating a Graph of Columns Average
Hello everyone,
I am a new user and I am stuck after few hours... And impossible to find a solution on the forum!
I have a table with different Columns: January, February, March etc..
and then each rows correspond to an user. I have the monthly electricity consumption of every user.
I want to display on a graph the average of each column by the month to compare the average of users consumption per month.
I have created first a graph with only the average of each columns on the Y-Axis, but It does'nt look good (photo)...
How can I do to have the months on my X-Axis ?
Thank you for your help !
Hi LouisB,
Thanks for your deatils data sample, but is only the month columns useful?
After unpivot your data model, you will get the Month column and another Value column.
Is that the value column the electricity consumption per month?
If you want to calculate the average, you could use calculate(average([value])).
If you still need help, could you share your desired average value so that I can know what value you want to get?
Best Regards,
Cherry
6 Replies
- Greg_DecklerCommunity Champion
You need to unpivot your month columns in your query. Then you can put that column in your x-axis.
- LouisBFrequent Visitor
Thank you for your answer, but after transposing my table, how to create a column with the average of all the line ?
So now I have: First column: the months, other columns: each column is an user data...
- Greg_DecklerCommunity Champion
Really need sample data that I can copy and paste. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490