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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Bartek_Smith
New Member

Sorting case

I used to use Tabelau for years, but now in my company we are going to change our BI soft to PowerBI. Preapering to migration I start to recognize PowerBI features, but I have huge problem with one of the most common function - sorting. What was trivial in tableau like sorting ascending/descending i.e. columns by year here is not that obvious.

Going to the point, I have done matrix table where in values part of matrix my data are sorted by year 23/24/25 but I can not sort in oposit way 25/24/23. How to do this? Any arrow icon doesn't appear, sort by different column (I created external calendar) doesn't work too (circular error). Any ideas how to fix it ? 

Sort.jpg

6 REPLIES 6
v-priyankata
Community Support
Community Support

Hi @Bartek_Smith 

Thank you for reaching out to the Microsoft Fabric Forum Community.

@FBergamaschi @rohit1991 @danextian Thanks for the inputs.

I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community. If your issue has been resolved, please accept the helpful response.

 

Hi @Bartek_Smith 

Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community. If your issue has been resolved, please accept the helpful response.

danextian
Super User
Super User

hI @Bartek_Smith 

I know it is counter-intuitive but the only solution is, what others have already mentioned, is to use a custom sort by column. I would duplicate the year column. In the image below, visual 1 users Year2 column sorted by another column while the second visual has no custom sort

danextian_0-1771836291655.png

danextian_1-1771836344238.png

Please see the attached pbix.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
rohit1991
Super User
Super User

Hii @Bartek_Smith 

 

In Power BI Matrix, column sorting (like Year 23/24/25) does not work from the visual header like Tableau. You must control sorting from the data model. If Year is text (e.g., 23/24/25), create a numeric sort column (e.g., 2023=1, 2024=2, 2025=3 or actual year number), then select the Year column >> Column tools >> Sort by Column >> choose the numeric sort column. Sorting by another column fails due to circular dependency if both columns depend on each other. After setting proper “Sort by Column” in the model, the Matrix will respect ascending/descending order correctly.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
FBergamaschi
Super User
Super User

Hi @Bartek_Smith,

sort by column is the way to go

 

You can do the following

 

1 - duplicate your calendar query in Power Query

2 - isolate the calendar year column, rmeove duplicates and sort descending

3 - merge the query to have a sorting column done before you load data in Tabular

 

FBergamaschi_3-1771835828192.png

 

 

Now you have a column you can use for sort by column and no circular issue

 

 

 

FBergamaschi_0-1771835729562.png

 

FBergamaschi_1-1771835752712.png

 

FBergamaschi_2-1771835779476.png

 

 

Attanched a pbix for reference where you can find the visual and all steps done

 

Best

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Hi,

Thx it works. I didn't expected that there the table copy is needed. A lot of mysterius is still ahead me in PowerBi xD

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.