Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
fz1
Frequent Visitor

How to do nested sorting in a stacked column chart

Hello, 

I am trying to do nested sorting in a stacked column chart and would appreciate any guidance on how to do it. This is my notional data:

fz1_4-1710167078516.png

 

This is what my stacked column chart (of number of parts by model & company) looks like, where the x-axis is showing the Model and Company, and y-axis is showing the count of Part Description (i.e. the total number of parts) broken down by Location (legend):

fz1_0-1710167666404.png

 

I have this set to Sort Axis by # of parts (descending), which is sorting the Models correctly but incorrectly grouping the Company. What do I need to do to sort this by the y-axis but the columns arranged by Company (so the order would be Lexus->Corolla->Camry-> Accord->Sonata)?

Thanks for any help!

1 ACCEPTED SOLUTION
v-xuxinyi-msft
Community Support
Community Support

Hi @fz1 

 

You need to create two order tables.

vxuxinyimsft_0-1710231682247.png

 

vxuxinyimsft_1-1710231706254.png

 

Merge each of the two order tables with the original data table.

vxuxinyimsft_2-1710232158706.png

 

vxuxinyimsft_4-1710232453938.png

 

Expand the merged table, keeping the sort column.

vxuxinyimsft_6-1710232678984.png

 

vxuxinyimsft_5-1710232628238.png

 

vxuxinyimsft_7-1710232714672.png

Click Close&Apply.

 

Sort the Company and Model columns according to the following actions.

vxuxinyimsft_8-1710232800531.png

 

vxuxinyimsft_9-1710232985091.png

 

Result:

vxuxinyimsft_10-1710233056182.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xuxinyi-msft
Community Support
Community Support

Hi @fz1 

 

You need to create two order tables.

vxuxinyimsft_0-1710231682247.png

 

vxuxinyimsft_1-1710231706254.png

 

Merge each of the two order tables with the original data table.

vxuxinyimsft_2-1710232158706.png

 

vxuxinyimsft_4-1710232453938.png

 

Expand the merged table, keeping the sort column.

vxuxinyimsft_6-1710232678984.png

 

vxuxinyimsft_5-1710232628238.png

 

vxuxinyimsft_7-1710232714672.png

Click Close&Apply.

 

Sort the Company and Model columns according to the following actions.

vxuxinyimsft_8-1710232800531.png

 

vxuxinyimsft_9-1710232985091.png

 

Result:

vxuxinyimsft_10-1710233056182.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

qqqqqwwwweeerrr
Super User
Super User

Hi @fz1 

 

I am not sure with your current configuration it is possible to custom sort. But i tried to work around if it makes sense you can use that. Here is my Approach 

Step 1: Create Custom column based on sorting order 
Step2: use this confriguration:

qqqqqwwwweeerrr_0-1710170924130.png

And i have sorted this with new created custom sort column

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem

Regards

 



 

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors