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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rbhattacharya
Helper I
Helper I

Arrange matrix column header in descending order (Date Column)

Hello,

 

Please refer to the attached screenshot. Is there any way to display the date column in descending order i.e. the latest date column values should get displayed first. Through edit query mode, I tried arranging the date column in descending order, but that didn't solve the purpose. Sorting by Group Name or Employee count also didn't help. Kindly advise.

 

Regards,

Ranjeeta

 

Capture.JPG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @rbhattacharya ,

 

Take a look at this blog about sorting matrix by column.

https://www.biinsight.com/quick-tips-how-to-sort-matrix-by-column-in-descending-order/ 

 

Best Regards,

Jay

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @rbhattacharya ,

 

Take a look at this blog about sorting matrix by column.

https://www.biinsight.com/quick-tips-how-to-sort-matrix-by-column-in-descending-order/ 

 

Best Regards,

Jay

Anonymous
Not applicable

Hello @rbhattacharya ,

 

I am not sure if it's the best solution but thats how i apply desc order for columns in matrix visual.

Data:

paraabhi17_0-1614093178204.png

Steps

  1.  create a duplicate column [Year-month copy ]from [year month ]text type
  2. create a calculated column -> sort for matrix = -1*int(dummy[Year Month - Copy])
  3. now sort your [Year-Month] column by calculated column sort for matrix.

BOOM! works like a charm.

 

 

 

 

 

amitchandak
Super User
Super User

@rbhattacharya , I have discussed this in video : https://www.youtube.com/watch?v=KK1zu4MBb-c

 

new columns

Date 1 =[Date]

Date Rank = rankx(All(Date), [Date])

 

Sort Date 1 on Date Rank and use Date 1 in visual

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit,

 

Thanks a lot for the response. I've been trying to implement using RANKX but unsuccessful till now. The date column I have is in "YYYYMM" format which is a text column to begin with. I'm trying to convert the same to a date format and then using RANKX. Somehow, the order is always ascending. Do you have any more suggestions regarding the same?

 

Regards,

RB

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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