Forum Discussion
Comparing Columns data & Show in Bar Chart
Dear All
i would like to compare two different column statuses in the same table and put into a bar chart. But no matter how i triggered the X axis and y axis, the data just doesn't show properly.
When i separate into individual status, it show correctly. But i just cant seems to combine those two and compare it side by side.
Data for March
Data for Sept
When i tried to combine the data, it just show this:
So the data from Mar is correct but for Sept, it just add up all the number of the training statuses.
My x axis now is status from Mar then y axis is count of status from Mar & count of status from Sept.
Not sure if im missing something as it just doesnt work. Really appreciate your help on this.
Thanks in advanced!
Hi LemonKing,
You don't need to sum the [Attribute] or [Value], but to count the [Staff or Training ID].
Try to put [Attribute] in the legend and the [Value] in your x-axis.
Or you can also put them in the matrix as below.
5 Replies
- isjoycewangSolution Supplier
Hi LemonKing,
Could you share some dummy data table to have a deeper check.
Since you say that the x-axis is the status from March, it seems that your status column is different for each month, which causes the incorrect calculation on Sep. counts.
Best Regards,
Joyce
- LemonKingFrequent Visitor
Hi Joyce
Thanks for helping on this.Not sure if this sample here helps..
Staff Name Training Name Mar-2023 Sep-23 UUU Apple Completed Completed PPP Orange Ongoing Completed QQQ Pineapple Cancelled Cancelled XXX Pear Registered Completed YYY Melon Ongoing Ongoing ZZZ Grape Registered Cancelled Basically the data would look like this but with 508 entries. So what im trying to do is to compare side by side so that i can see the comparison easily.
Im also open to other suggestion to compare this by visualisation. Since im new in PowerBI, i can only think of what is the simplest to work with.
Thanks!
- isjoycewangSolution Supplier
Hi LemonKing,
Please try to unpivot your data in the Power Query editor (click on Transform Data from the Home tab)
1. Select [Staff] and [Training] column, and select "Unpivot other columns"
2. You'll get an unpivoted table like below
3. Unpivoted table is easier for you to have analysis
Best Regards,
Joyce
- LemonKingFrequent Visitor
Hi Joyce
Sorry a noob question.
I have use the step mentioned but my table look like this:
My X and Y can only do count and i dont think i can sum the string..
How may i proceed with this? i just cant get to present the data as your final output like this:
Many thanks!