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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
bcampbell
Helper I
Helper I

Sort / Arrange Matrix Values

I have a matrix table , and I would like to reaarange the values based on typical flow

 

Correct Order would be DISP,ENRT,ARRVD,RETRN, and CMPLT

 

Would I need to create another table with my header value and a number value ?   how do i then sort by that table ?

 

Thanks

 

snip.png

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @bcampbell,

 

I'm assuming that the headers on the table are a category on your data table, based on that for making a custom sort the best option is to create a new table with the following format:

 

Cat            ID

DISP 1
ENRT 2
ARRVD 3
RETRN 4
CMPLT 5

 

Sort the column CAT by the column ID and then make a relationship to the first table.

 

Lastly use the value on the table above for your matrix and the values should be in order.

 

As you can see on below the first table uses columns from a single table and the order is alphabetic, on the second one using the sorting table it's on the order you need.

sorting_matrix.png

 

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

5 REPLIES 5
MFelix
Super User
Super User

Hi @bcampbell,

 

I'm assuming that the headers on the table are a category on your data table, based on that for making a custom sort the best option is to create a new table with the following format:

 

Cat            ID

DISP 1
ENRT 2
ARRVD 3
RETRN 4
CMPLT 5

 

Sort the column CAT by the column ID and then make a relationship to the first table.

 

Lastly use the value on the table above for your matrix and the values should be in order.

 

As you can see on below the first table uses columns from a single table and the order is alphabetic, on the second one using the sorting table it's on the order you need.

sorting_matrix.png

 

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





Well,

 

I thought I did it correct

 

Matrix still doesnt want to sort correctly

 

TableSort.PNGSort Table.PNG

When I replace the column with the sort column it shows that in order

 

1.PNG

 

 

Hi @bcampbell,

 

When I refer to sorting the category by the Sort column is not on the  table view but on the Sort by column button.

 

Check the images below:

 

sortbycolumn_10.pngsortbycolumn_11.png

 

Images taken from https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





oh , i apologize

 

Thanks for the help.. worked out good

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.