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

Column sort order using month and Year

Hi,

 

Can someone please guide me on how to sort a Matrix visual by month_year (Date field) sorted descending.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,

Have column like this in you date table

Month Year = FORMAT([Date],"mmm-yyyy")
Month Year sort = FORMAT([Date],"yyyymm")

Make Month Year sort  as you sort column and you can use three dots on visual to sort asc or Desc

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

 

If you are looking it for a Matrix column where there is no option to sort. Use the below on as your sort column


Month Rank = RANKX(ALL('Date'),'Date'[Month Year Sort],,DESC,Dense)

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@Anonymous ,

Have column like this in you date table

Month Year = FORMAT([Date],"mmm-yyyy")
Month Year sort = FORMAT([Date],"yyyymm")

Make Month Year sort  as you sort column and you can use three dots on visual to sort asc or Desc

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

 

If you are looking it for a Matrix column where there is no option to sort. Use the below on as your sort column


Month Rank = RANKX(ALL('Date'),'Date'[Month Year Sort],,DESC,Dense)

Pragati11
Super User
Super User

Hi @Anonymous ,

 

Can't help much until you share some screenshots here. But follow following article on sorting columns in Matrix:

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

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

@Pragati11

Thank you for your response and link.

Yes, that's what i 'm stuck on.

 

@amitchandak 

Thank you for your answers,

I tried your solution but didnt work for me.

 

Is there any way i can attach a mockup PBI file over here,?

 

 

@Anonymous , refer to the attached file after signature check page 3.  You can upload on dropbox or one drive and share the link.

 

Hi @Anonymous ,

 

Just want to understand what you are stuck on.

You can use Weshare to share your pbix or dropbox.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

It's working as desired. Tqvm 

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.