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

View all the Fabric Data Days sessions on demand. View schedule

Reply
MarlenePirker
Helper I
Helper I

Flexible matrix sorting

Hello! 

 

I created a matrix and now want to sort the countries like in the image. I already created a index but I dont understand how to sort the matrix using the index and then hide the index column. 

 

MarlenePirker_0-1663146760582.png

MarlenePirker_1-1663146869105.png

Is that even possible? I found similiar questions but none of them really helped me... 

 

Thank you so much. 

 

1 ACCEPTED SOLUTION

In PowerBI set this field in your country table on the "Customer Country" column to your "Customer Country Index".

 

lukiz84_0-1663150162177.png

 

When you put Customer Country on your Matrix and below columns from other connected tables, then afterwards sort your matrix by"Customer Country". And PowerBI automatically uses the Index to sort it, even if you don't put it there.

 

You can also send me a message, if you are still stuck and want to write about it in German 😉

 

BR

 

 

View solution in original post

7 REPLIES 7
MarlenePirker
Helper I
Helper I

Yeah but I dont understand where to but the index. If I put it in the rows it will become a hierarchy and I dont know how to hide that. This doesnt hide. And its a matrix not a normal table..

You don't need to put it on the matrix. PowerBI uses it internally, when sorting the "Customer Country" field.

 

BR

My matrix is consiting of data from 3 different tables connected by relationships. I dont really get what table I should sort here and how this would change my matrix. I am sorry but I dont understand what you mean 🙂 

In PowerBI set this field in your country table on the "Customer Country" column to your "Customer Country Index".

 

lukiz84_0-1663150162177.png

 

When you put Customer Country on your Matrix and below columns from other connected tables, then afterwards sort your matrix by"Customer Country". And PowerBI automatically uses the Index to sort it, even if you don't put it there.

 

You can also send me a message, if you are still stuck and want to write about it in German 😉

 

BR

 

 

Ooh I understand now! Thank you so much! It worked 🎉

glad i could help 🙂 gutes gelingen 

lukiz84
Memorable Member
Memorable Member

Hi,

 

in your Table set the "SortByColumn" to the "Customer Country Index" field

 

BR

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors