Change sort order for categories on columns - PowerBI

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



3

1 Like