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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Sort Column Header in Matrix Table

Hi Experts

 

I am trying to sort column Headers in a Matrix Table.....so they are in number order increasing...unable to do this action???Capture.PNG

 

The image shows 1 then 10 then 11 and not item 2 then 3 etc....

2 ACCEPTED SOLUTIONS

@Anonymous

 

Just 2 days ago i wrote a quick post on Custom Sorting

Hope it will be useful

 

http://www.excelnaccess.com/custom-sorting-in-power-bi/


Regards
Zubair

Please try my custom visuals

View solution in original post

Anonymous
Not applicable

Thanks Zubiar...

 

got half way their missed the last steps out.....excellent aritcle

View solution in original post

10 REPLIES 10
Vmpbi
Frequent Visitor

Thanks for sharing… check out the links below. It provides a comprehensive guide on how to sort measures as columns

in a matrix visual.

https://insurancedatainsights.blog/2024/04/27/dax-topn-brokers-and-others/

Unlock Dynamic Data Display In Your Power BI Matrix

gabz40
New Member

@Zubair_Muhammad @Stachu Hi, your solutions work assuming that you are in Import mode and see the Table view. Any solution for users using Direct Query to order the column headers in a specific way other than alphabetically? 


kta87
Helper I
Helper I

The provided solution is not working if you want to sort the column headers of a matrix.

Stachu
Community Champion
Community Champion

as the field type is text it sorts alphabetically
you can either:

1) use custom sort (you would need to create numeric rank column first)

Capture.PNG

2) reformat the data so alphabetical order would meet your needs, e.g. changing format number to 01, 02, ... , 10, 11 etc.



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Hi

 

How would you create a numeric rank column...happy to learn...i tried adding an index column did not work??

@Anonymous

 

Just 2 days ago i wrote a quick post on Custom Sorting

Hope it will be useful

 

http://www.excelnaccess.com/custom-sorting-in-power-bi/


Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

Hello,

 

For some reason this link is not working. Can you please re-send?

 

Thanks!

Anonymous
Not applicable

I have a Matrix that I am trying to sort the column headers in. 


2019-07-29_12h17_32.png

I would like to put the column headers in this order:

  1. Quote
  2. Open
  3. Pending
  4. Business Office
  5. Sold
  6. Posted

I tried creating a new column and called it Deal Status Column and used the following:

 

Deal Status Column = IF('Vehicle Sales'[Sales Status] = "Quote", 1, IF('Vehicle Sales'[Sales Status] = "Open", 2, IF('Vehicle Sales'[Sales Status] = "Pending", 3, IF('Vehicle Sales'[Sales Status] = "Business Office", 4, IF('Vehicle Sales'[Sales Status] = "Sold", 5, IF('Vehicle Sales'[Sales Status] = "Posted", 6))))))
 
I then clicked on the original Deal Status in the Fields list and clicked Sort by Column and selected teh Deal Status Column and I get the following pop up:
2019-07-29_12h22_35.png
I'm not sure where to go from here. Any suggestions?
Anonymous
Not applicable

Hi Zubair

Can we un do the acceptance...i clicked the wrong button, your solution was prefect.

Anonymous
Not applicable

Thanks Zubiar...

 

got half way their missed the last steps out.....excellent aritcle

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.