Matrix currently doesn't allow you to sort the columns based on designating values as being a priority above the column field names.

For example, my field in the columns section results in three columns. If you add two sets of values, you are forced to see: Column 1, Value 1, Value 2, Column 2, Value 1, Value 2, etc. Like in a Pivot Table, you should be able to prioritize values so that it shows as: Column 1, Column 2, Column 3, Value 1, Column 1, Column 2, Column 3, Value 2.

- Comments (67)

## RE: Matrix - Sort columns by value

We really need all matrix columns to be sortable when the values are based on one field, as they are in a table or in a matrix where every column is based on a separate value field. Tables are difficult to work with in other ways (e.g. you'd need to add a measure for every column instead of just one for all columns), so we can't use those.

## RE: Matrix - Sort columns by value

This is such a basic gap in this experience I'm surprised it's still not closed.

## RE: Matrix - Sort columns by value

Scheduled Refresh -Time

We are able to select Time, for example, 9:00AM or 9:30 AM or 10:00 am or 10:30 am and so on for 48 times in a day.

However If we can have option to choose 9:15 am and 9:45 am and 10:15 am and 10:45 am, It would have been better. we are fine with 48 times in day.

## RE: Matrix - Sort columns by value

#### Matrix - Sort columns by value

Could you please make this happen or maybe come up with the new Matrix visual itself?

## RE: Matrix - Sort columns by value

It's 2023... is this still not an option?

## RE: Matrix - Sort columns by value

needed when crossfiltering between tables and matrix. matrix provides one vision and the detail is in the tables.

## RE: Matrix - Sort columns by value

Many of our visuals are done by value then year in the matrix form and this is not possible in Power BI without messing with the tables. We've been instructed to switch from Tableau to Power BI, but without this simple item, it won't be happening.

Instead of:

2021 2022

Market Revenue Company Revenue Share % Market Revenue Company Revenue Share %

We need:

Market Revenue Company Revenue Share %

2021 2022 2021 2022 2021 2022

## RE: Matrix - Sort columns by value

Perhaps I am missing the point, but doesnt the menu on the top right of the visual allow for a Sort By on any of the Values columns?

## RE: Matrix - Sort columns by value

While not a direct solution, there is a simple workaround to this problem, it requires just two steps:

1. Create a new column in your table called "Sort Order". This columns needs to map 1:1 to the original column. This Sort By column should be in ascending order in the order you want your original column to be ordered.

2. Use Power BI's "Sort by" feature to sort your original column by the new "Sort Order" column you just created.

For example, if you had Year in the columns of a matrix. You could get them in descending order by creating a new column Sort Order = -Year. Then use the Sort By feature in Power BI to sort Year by your new Sort Order column.

## RE: Matrix - Sort columns by value

To add to this, I have a matrix that displays calendar years as columns and would like the ability to sort these years from descending or ascending for example (Can currently be done in Excel Power Pivot but not Power BI)

Department 2017 2018 2019 2020 2021

Sales Value Value Value Value Value

Accounting Value Value Value Value Value

OR

Department 2021 2020 2019 2018 2017

Sales Value Value Value Value Value

Accounting Value Value Value Value Value