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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Sorting on Stocked column chart

Hi, 

 

I have got a stocked column chart with Year on X - axis , Total sales as Value and Product Type as Legend, I have sorted the X axis by Year but the legend are displying in alphabetic order, How could I sort the legend by total sales in (ASC/DSC).

Stocked_Sort.PNG

1 ACCEPTED SOLUTION

Hi @Anonymous ,

I'm afarid that you can submit this idea to https://ideas.powerbi.com/forums/265200-power-bi-ideas to make it coming sonner based on it may not supported currently.

 

Best Regards,

Yingjie Li

 

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

4 REPLIES 4
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Please make sure whether the data type pf Year you have put in X-axis is a sigma()  value like Whole number, Decimal number or Fixed decimal number. If so, you cannot use sort by function in stack column chart. You can change the Year data type into Text to try again. Here is my tested result:

When the Year is a sigma value, I cannot find sort by function in the visualWhen the Year is a sigma value, I cannot find sort by function in the visual

After I changed the data type into text, I can use sort by function normally in the visualAfter I changed the data type into text, I can use sort by function normally in the visual

For further information about sort by, you can refer the following Microsoft document that could help you:

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column#sort-using-the-sort-by-column-button

 

Best Regards,

Yingjie Li

 

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

Anonymous
Not applicable

@v-yingjl , When you sort by Total Sales, the Year is not coming in order,

I want to sort the X axis with year in ASC/DSC and Sort the legend by total Sales in DSC.

 

I'm not sure whether it is possible ? 

 

 

Hi @Anonymous ,

I'm afarid that you can submit this idea to https://ideas.powerbi.com/forums/265200-power-bi-ideas to make it coming sonner based on it may not supported currently.

 

Best Regards,

Yingjie Li

 

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

amitchandak
Super User
Super User

Got to three dots and check in options, you can choose column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.