Forum Discussion
Sorting by Year/Month and Display Month Name
- 6 years ago
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-with-Winners/ba-p/890814
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
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-with-Winners/ba-p/890814
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
- Anonymous6 years agoNot applicable
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