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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
e175429
Helper III
Helper III

Putting stacked column chart in order

Ok, this is my current chart:

e175429_0-1720032021518.png

I want it so that the tenure goes in order from "less than 6 months" to "more than 10 years".

 

I have 2 options to sort on the axes. When I chose either of them and choose ascending, I still don't get the correct order axes.

e175429_1-1720032214881.png

 

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

Hi,@e175429 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1720062729422.png

 2.Then the bar graph currently generated is as follows:

vlinyulumsft_1-1720062743773.png

3.First go to the Power Query page and click the button below to enter the sort number according to your requirements:

vlinyulumsft_2-1720062754335.png

vlinyulumsft_3-1720062764417.png

4.Then click on the column that you want to sort and change the position in the image below

 

vlinyulumsft_4-1720062783050.png

5.Finally, you just need to regenerate the visualization, and here is the new resulting diagram:

vlinyulumsft_5-1720062810331.png

You may want to note that the type of column you need to sort may not work if it is a number.

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

1 REPLY 1
v-linyulu-msft
Community Support
Community Support

Hi,@e175429 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1720062729422.png

 2.Then the bar graph currently generated is as follows:

vlinyulumsft_1-1720062743773.png

3.First go to the Power Query page and click the button below to enter the sort number according to your requirements:

vlinyulumsft_2-1720062754335.png

vlinyulumsft_3-1720062764417.png

4.Then click on the column that you want to sort and change the position in the image below

 

vlinyulumsft_4-1720062783050.png

5.Finally, you just need to regenerate the visualization, and here is the new resulting diagram:

vlinyulumsft_5-1720062810331.png

You may want to note that the type of column you need to sort may not work if it is a number.

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

 

 

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.