Forum Discussion
JustinDoh1
Post Prodigy
4 years agoHow to sort Month under Year hierarchy
I am attaching my Pbix file here. I am trying to order month in descending order (in a slicer). Example: Feb --> Jan for 2022 Dec --> Nov --> Oct ... --> Jan for 2021. This is what I have now...
- 4 years ago
JustinDoh1 , Create two columns in your table
Month1 = FORMAT([Date],"mmm")
Month1 sort = month([DAte])Month Rank = RANKX(ALL('Date'),'Date'[Month Year Sort],,DESC,Dense)
Sort month1 on month Rank and use that in visual
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
amitchandak
Super User
4 years agoJustinDoh1 , Create two columns in your table
Month1 = FORMAT([Date],"mmm")
Month1 sort = month([DAte])
Month Rank = RANKX(ALL('Date'),'Date'[Month Year Sort],,DESC,Dense)
Sort month1 on month Rank and use that in visual
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c