Forum Discussion
How to Create Multi-category Charts with legends
Hi everyone, I came across a multi-category chart visualisation where bar charts were displayed with grouping by category and with a separate legend. Is it impossible to do up a similar view within Power BI? Thanks in advance.
Hello Zhang Jing,
Thank you for the help. From your example, what needs to be done is to switch the Category with the Status. After some trial & error I have managed to get the view that I was looking for:
3 Replies
- amitchandak
Super User
damienz , You need to create a color measure .
Color Category = SWITCH(Max('Item'[Category]) ,
"Category 1" , "Blue",
"Category 2" , "Green",
"Category 3" , "Gray",
"Category 4" , "Yellow",
"Category 5" , "Silver"
)In case you have legend move that to axis - Switch of concatenate label and sort on both axis columns
Use the color measure in conditional formatting using the field value option
refer the power bi part
Tableau Vs Power BI- Chapter 4- Bar/Clustered Bar: https://youtu.be/2P5BBRN853c
- v-jingzhang
Community Support
Hi damienz
You can put the group column in Axis field and the other legend column in Legend field on a bar chart. Is this what you want?
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.- damienzNew Member
Hello Zhang Jing,
Thank you for the help. From your example, what needs to be done is to switch the Category with the Status. After some trial & error I have managed to get the view that I was looking for: