Hi!
First time poster, long time viewer of Sam’s videos.
Is there a way to change the sort order on the columns from ascending to descending, i.e. from 2018-2019-2020 to 2020-2019-2018?
To clarify, I want to change the order of the columns, not sort the rows based on the values in a specific column.
Create a custom column in the date table, that will determine the sort order of the years, 2020 gets 1, 2019 gets 2, and so on and then you can use Sort by column option
Column =
VAR MaxYear =
RIGHT ( YEAR ( MAX ( Dates[Date] ) ), 2 )
VAR Result =
VALUE ( RIGHT ( YEAR ( Dates[Date] ), 2 ) ) - VALUE ( MaxYear )
RETURN
ABS ( Result ) + 1
Thank you for the reply.
That’s actually the way I solved myself but it felt really weird that that was the only option. Felt like I was missing one of the gazillion settings we have at our disposal. Shouldn’t there be a three-dot menu that solves this without any more columns?
For myself,
I like that I can set the sort order in one location, and use that same column in multiple visuals without having to re-set the sort order each time. (This can be particularly handy if you often have to present tables or charts with Month columns that are text instead of numeric).