Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi. I have a matrix in Power BI with "Medewerker" in the Rows, "MMM-YYYY NL" (showing the month) in the columns and a measure called "% Declarabel" in the Values. See the screenshot for an example. The column "MMM-YYYY NL" comes from the table "Dim Date" and it contains the values jan-2025, feb-2025, mrt-2025, apr-2025, mei-2025, jun-2025, jul-2025, aug-2025, sep-2025, okt-2025, nov-2025 and dec-2025. I can sort the matrix based on the measure, but this only sorts the column which shows the totals. I would like to give the user the possibility to sort the values in the pivot from high to low (or the other way around) based on the month. This month should be selected by the user in a slicer. It is important that all months are always shown in the pivot.
If I set the sorting of the matrix on the measure on "% Declarabel" then I can only sort on the total column. I know that instead of including one measure in the table I can create a separate measure for each month and that would fix the problem, but that is not how I want it as it is super inefficient. It is driving me crazy that I don't know how to fix this. Does anyone have some advice how to fix this and also keep just one measure in the matrix?
Solved! Go to Solution.
Hi @robbert-bi
Matrix can be sorted by the total column or by the row category. Column category is sorted alphabetically in ascending order or by custom column sort. If you want to sort it by the total row, attached is a round about way to do it.
Hi @robbert-bi
Matrix can be sorted by the total column or by the row category. Column category is sorted alphabetically in ascending order or by custom column sort. If you want to sort it by the total row, attached is a round about way to do it.
@robbert-bi , you are correct. There is no default option in matrix visual to sort by specific column (month in your case).
As you already mentioned, adding measure/column for each month is not ideal solution.
Give a try to Zebra BI Tables custom visual. It gives allows you to sort by columns - just check if it requires paid license or that feature is free.
I think that also license is not that high on a yearly basis, worth checking.
Cheers,
Nemanja
@robbert-bi , Sort on Measure on column is not possible. But if you want desc sort on Month no. You can do it using sort column
Assume you have two column , Month Year, and Month year Sort to sort month year asc
You can create one
Month Year 1 = [Month Year]
Month Year Sort desc = rankx('Date', [Month Year Sort])
Now mark Month Year Sort desc as sort column for Month Year 1 and use that in visual
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
Hi @amitchandak . Thanks for the response. I know how to sort the months. It is about sorting the values within the months, so on the vertical axis of my matrix.
User | Count |
---|---|
84 | |
80 | |
70 | |
47 | |
43 |
User | Count |
---|---|
108 | |
54 | |
50 | |
40 | |
40 |