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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

9 REPLIES 9
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.