Change sort order for categories on columns - PowerBI

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



3

1 Like

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?

I think that is only available for Rows as of now in a table visual.

Others have wondered the same thing @Springtime, and are some ideas on the ideas.powerbi.com forum that I think it exactly what you are requesting (you may want to see if you can find others, and vote them up)
https://ideas.powerbi.com/ideas/idea/?ideaid=33b5ecdf-854e-4f3c-b1db-6e417d313f1f
https://ideas.powerbi.com/ideas/idea/?ideaid=7ac563f3-f6b0-43d0-b019-3c29b9f7ba25

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).

Yeah - that seems to be it.