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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Year Sort on Clustered Column Chart

Does anyone know how to switch the order of the years on the chart below? This is a clustered column chart. Years is my Legend

 

rmauldin_0-1620150175506.png

 

2 ACCEPTED SOLUTIONS

Hi, @Anonymous 

Sorry that I could not find a way to sort the Attribute column by writing measure.

So, I created a reverse index column in Power Query Editor.

Please check the below link.

 

https://www.dropbox.com/s/e2yqo7kyupk3knl/Sample%20Data.pbix?dl=0 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

I'm pretty sure that the idea of creating a sorting column is completely correct, but there is a problem here.

Your sorting column is calculated based on the year column, and then the year column is sorted based on the sorting column.

This will cause a circular dependency, which cannot be supported.

v-angzheng-msft_0-1620296763996.jpeg

v-angzheng-msft_1-1620296763997.jpeg

You can try to create an index table in Power Query to create a sorting column by merging.

As Kim did, if that doesn’t work, you can try to create a sort hard-code in the data source, which is easy to make in Excel, and then import the data to Power BI

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

Best Regards,
Community Support Team _ Zeon Zheng
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

6 REPLIES 6
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

I'm pretty sure that the idea of creating a sorting column is completely correct, but there is a problem here.

Your sorting column is calculated based on the year column, and then the year column is sorted based on the sorting column.

This will cause a circular dependency, which cannot be supported.

v-angzheng-msft_0-1620296763996.jpeg

v-angzheng-msft_1-1620296763997.jpeg

You can try to create an index table in Power Query to create a sorting column by merging.

As Kim did, if that doesn’t work, you can try to create a sort hard-code in the data source, which is easy to make in Excel, and then import the data to Power BI

 

 

Is this the result you want? Hope this is useful to you

Please feel free to let me know If you have further questions

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

I am not sure how your data model looks like, but one of many ways is,

create a ranking measure for 1980 1990 2000 2010 2020 and put the measure into the tooltip section of the visualization. Then, you can click three dots (upper right side of the visualization) and select the option that is "sort by ranking measure. By doing this, you can select ascending order or descending order of the ranking measure.

Or, please share your sample pbix file's link here, then I can try to look into it to come up with a more accurate measure.

Thank you.

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Here is my sample data. Thank you. I just want the years re-ordered to Newest to oldest. 

 

https://drive.google.com/file/d/1x9CjUcJ94fXLyY5yryLX3vNLUnc4Gidr/view?usp=sharing

 

Hi, @Anonymous 

Sorry that I could not find a way to sort the Attribute column by writing measure.

So, I created a reverse index column in Power Query Editor.

Please check the below link.

 

https://www.dropbox.com/s/e2yqo7kyupk3knl/Sample%20Data.pbix?dl=0 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
ZikoPowerBI
Helper II
Helper II

Capture.PNG

 

Please follow the above screenshot

ZikoPowerBI
Helper II
Helper II

Go to Data view and select the year column and right click and sort as descending. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors