Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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
Solved! Go to Solution.
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
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.
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.
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.
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.
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
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
Please follow the above screenshot
Go to Data view and select the year column and right click and sort as descending.
User | Count |
---|---|
98 | |
76 | |
75 | |
48 | |
26 |