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
showy
Helper II
Helper II

Change sorting only in one visual visual calc

Hi
i have a big report with some matrix. There the month are the colums. I sort them with a monthSort colum in the datedimesion.
Jan = 1, Feb =2 , Mar = 3 .... Dez = 12
Everything is working fine.

Now i have one matrix where i want to have a reverse order. In case of 2025 i should start with May, April, Mar, Feb and end with Jan.

My idea is to build an copy of the month colum in the datedimension as monthReverse and also a monthSortReverse column.
Then i would use this monthReverse in the Matrix because its only need for one matrix and shouldn't affect the other matrix.


Is there a better way to do this? Maybe on the level of visual calc?


Thanks😀

2 ACCEPTED SOLUTIONS
pankajnamekar25
Super User
Super User

Hello @showy 

Create two new columns in your date table:

MonthReverse = FORMAT('Date'[Date], "MMM")

MonthSortReverse = 13 - 'Date'[MonthSort]  -- If Jan = 1, Feb = 2...

Then in that specific matrix

Use MonthReverse for the column headers.

Sort MonthReverse by MonthSortReverse.

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

View solution in original post

v-achippa
Community Support
Community Support

Hi @showy,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Since the matrix ranges multiple years so just sorting by month may not work. Please follow below steps:

  • In your date table create a new column:
    YearMonth = FORMAT('Date'[Date], "MMM yyyy")
  • Then create a reverse sorting column:
    YearMonthSortReverse = 100000 - (YEAR('Date'[Date]) * 100 + MONTH('Date'[Date]))
  • In the matrix visual use YearMonth in the column headers and sort YearMonth by YearMonthSortReverse.

This will sort the columns in reverse order for all months and years.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

View solution in original post

5 REPLIES 5
v-achippa
Community Support
Community Support

Hi @showy,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Since the matrix ranges multiple years so just sorting by month may not work. Please follow below steps:

  • In your date table create a new column:
    YearMonth = FORMAT('Date'[Date], "MMM yyyy")
  • Then create a reverse sorting column:
    YearMonthSortReverse = 100000 - (YEAR('Date'[Date]) * 100 + MONTH('Date'[Date]))
  • In the matrix visual use YearMonth in the column headers and sort YearMonth by YearMonthSortReverse.

This will sort the columns in reverse order for all months and years.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Thanks and regards,

Anjan Kumar Chippa

Thanks that worked perfectly😀

bhanu_gautam
Super User
Super User

@showy Add the month column to the matrix visual.
Sort the month column by the MonthSort column in descending order.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






pankajnamekar25
Super User
Super User

Hello @showy 

Create two new columns in your date table:

MonthReverse = FORMAT('Date'[Date], "MMM")

MonthSortReverse = 13 - 'Date'[MonthSort]  -- If Jan = 1, Feb = 2...

Then in that specific matrix

Use MonthReverse for the column headers.

Sort MonthReverse by MonthSortReverse.

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

Hi pankajnamekar25

i tried this but i saw that i need also the year information because the matrixrange will be over multiple year. How would you solve this? 
So the matrix schould start with May 25, Apr 25, Mar 25, Feb 25, Jan 25, Dez 24 .... Jan 24

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.