Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello I just want to know is it possible to group like this
and the data in group are sorted by value
is it possible
Solved! Go to Solution.
Hi @FewHow ,
Please follow the below steps,
Step1 : Create a table like below with required field
Step2 : Hold the shift key and sort Product category column and Sales column (We can sort more than one column by holding shift key)
see the table values are now sorted by Product category and sales now,
Step3 : then select the above table and change its visual type to Bar chart, so it will display like below,
Please accept it as a solution if it answers your question 🙂
Hi @FewHow ,
Please follow the below steps,
Step1 : Create a table like below with required field
Step2 : Hold the shift key and sort Product category column and Sales column (We can sort more than one column by holding shift key)
see the table values are now sorted by Product category and sales now,
Step3 : then select the above table and change its visual type to Bar chart, so it will display like below,
Please accept it as a solution if it answers your question 🙂
Thank you for your reply
I tried your method but I still got chart like this
When I changed table to cluster chart it seems like the sorting is canceled
Oh I tried again and it worked thank you very much.
Here’s a step-by-step guide on how to do this in Power BI using a Clustered column chart.
1. Add Your Data Fields
Y-axis: Drag your numerical value here (e.g., Sales, Count, etc.).
X-axis: This is the key step. First, drag your main grouping field (your Category) to the X-axis. Then, drag the field for the individual bars (e.g., Subcategory or Product) underneath the Category field in the X-axis bucket. This creates the hierarchy.
2. Expand the Hierarchy
On the top-right corner of your chart visual, click the "Expand all down one level in the hierarchy" icon. This will display both the main category and the individual bars within it, creating the grouped look.
3. Apply the Correct Sorting
Click the More options (...) menu on the top-right corner of the visual.
Select Sort axis.
In the submenu, choose to sort by your value field (the one you placed on the Y-axis).
Finally, make sure to select Sort descending.
If this explanation and solution resolve your issue, please like and accept the solution.
Hello thank you for reply
I already did it and got like this
it sorted by value but the category is messy, did I do it correctly
User | Count |
---|---|
72 | |
67 | |
38 | |
25 | |
23 |
User | Count |
---|---|
96 | |
93 | |
50 | |
43 | |
42 |