Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I am new to the community and have found a lot of good information, but nothing has solved the exact problem I am facing.
I've got a Matrix that I need to sort by month, but I need the most recent month to appear at the top of the list:
January
December
November
etc.
Obviously now that we're in the new year, I had to solve for January and December sorting to opposite ende of the Matrix, which I managed to solve for using the solution posted HERE. Unfortunately, this leaves me with rather unappealing month names:
202001
201912
201911
etc.
I would like to keep this sort (another method is welcome), but I would also like to display the Month name like in the example above.
I don't mind if the year is visible:
January 2020
December 2019
November 2019
etc.
but would prefer the month only.
Does anyone know how this might be possible?
Thanks in advance!
Solved! Go to Solution.
For Month - Year Like Jan-2020, Feb 2020 or January 2020, February 2020.
Create a new column
Sort Month Year = format(Date[date],"YYYYMM")Now make it as the sort column for you Month-Year from model view
For only Month Column Create one more column
Sort Month = format(date[Date],"MM")
Use this as a sort column.
Most of the visuals sort on first measure or value. Change it to sort on month year.
Refer any of the pbix from my blogs give below, You will also find code
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
For Month - Year Like Jan-2020, Feb 2020 or January 2020, February 2020.
Create a new column
Sort Month Year = format(Date[date],"YYYYMM")Now make it as the sort column for you Month-Year from model view
For only Month Column Create one more column
Sort Month = format(date[Date],"MM")
Use this as a sort column.
Most of the visuals sort on first measure or value. Change it to sort on month year.
Refer any of the pbix from my blogs give below, You will also find code
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
I've realized my mistake.
Amitchandak,
I'll mark your answer as a solution for such a speedy response! Though it is a similar solution to the link that I provided in my question, there really wasn't a problem with either solution--I was simply using the 'Sort by column' feature wrong.
In case anyone else stumbles across the same issue--you need to highlight the column that will be used in the Matrix (or other vizualization) and THEN use 'Sort by Column' to select which column you want your visible column to be sorted by.
I know--silly.. but I appreciate the help all the same!
SStange
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.