Forum Discussion
krist_pbi
3 years agoHelper I
Order axis for matrix visual
Hi community, I need help with the following, is there a way I can sort the column axis (dates) from oldest to newest but from left to right? It doesn't let me do it, I have a client that doesn't...
danextian
3 years agoSuper User
Hi krist_pbi ,
I tested that myself. There is no option to sort the column in a matrix unless it is sorted by another column. So the workaround is to create a date calc column in DAX or duplicate it in PQ and then use RANKX to create a sort by column.
See sample formulas and the screenshot below
Date2 =
'DataTable'[Date]DateRank =
RANKX ( VALUES ( 'DataTable'[Date] ), 'DataTable'[Date],, DESC )
krist_pbi
3 years agoHelper I
Thank you, just one question, the formula you shared then has to be created as a calculated column in my Calendar table, correct? Then just sort the weeks by this column, correct?
DateRank =
RANKX ( VALUES ( 'DataTable'[Date] ), 'DataTable'[Date],, DESC )