Forum Discussion
Hierarchy Slicer sort by multiple columns
Hell All,
I have a very basic requirement where we need to sort the fiscal year, fiscal quarter, fiscal month and dates in descending order where as the latest date and current month and current quarter and fiscal year should always be on top.
For example: FY - April to March
Asof date - 15-02-2024
Hierarchy Slicer should be selected as (Expected Result)
Fiscal Year - FY-2024
Fiscal Quarter - Q4
Fiscal Month - Feb
Date - 15-02-2024 or whichever is the most
In Power BI, when i build the hierarchy slicer
I can only sort by any one of the column
Now I did sorted based on Dates in Descending order, but I was expecting FEB month should be above to JAN month which is not in this case.
If i sort it by Month then
Im loosing the Date sorting and the dates are in ascending order though the month is in descending order.
For me, this is very basic feature in any BI world but why we do not have this yet in power bi.
I see in table visual we can do this multiple columns sorted by using SHIFT+SORT
but why not in slicer.
Is this achievable by any other workaround?
Please advice.
Thanks,
Mohan V.
Mohan128256 , What you can for this case have some additional column with sort order you want, using sort by column
Date Desc =[Date]
Date Rank = rankx('Date', 'Date'[Date])
Mark Date Rank as Sort column for Date Desc and use in visual
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-cYou can do same with month, Qtr, and year as per need
The date is using the sort column
1 Reply
- amitchandak
Super User
Mohan128256 , What you can for this case have some additional column with sort order you want, using sort by column
Date Desc =[Date]
Date Rank = rankx('Date', 'Date'[Date])
Mark Date Rank as Sort column for Date Desc and use in visual
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-cYou can do same with month, Qtr, and year as per need
The date is using the sort column