Forum Discussion
Sorting columns behavior in matrix not working
- 4 years ago
Just in case anyone has this issue, I found a solution. This may not be the most optimal but it works...
I wrote my SQL code to have 2 Rank() Over functions, one that ranks the date column in Desc order and a 2nd that Ranks the Year in Desc Order.
I'm sure you could create the same columns in Power BI, I'm just more comfortable, writing SQL vs DAX
Hi cathryn13
Try to create two seperete sort columns for Year and Weekend date and Sort Year to Year sort column and Weekend Date to Weekend Date Sort column. This should work and we can order any type ascending or descending to the columns which we required.
Say for example we want hierachy order as A-P1,A-P3,A-P2 for all the parent values then we can create sort by column according to that required order.
Source
Output