Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have a matrix which is as follows: where field settings are:-
Rows: Column A and Column B
Values: Column C
Metrix | ||
Column A | Column B | Column C |
1 | 1252 | 12 |
1276 | 67 | |
2652 | 13 | |
8762 | 53 | |
2 | 1273 | 65 |
4581 | 12 | |
7687 | 99 | |
1236 | 12 | |
8632 | 65 |
I want to sort this by column C in descending order like this:
Column A | Column B | Column C |
1 | 2652 | 99 |
1276 | 67 | |
8762 | 53 | |
1252 | 12 | |
2 | 7687 | 98 |
8632 | 66 | |
1273 | 65 | |
1236 | 12 | |
4581 | 12 |
Bus if I sort matrix by column C here is what i get:
Column A | Column B | Column C |
2 | 7687 | 98 |
8632 | 66 | |
1273 | 65 | |
1236 | 12 | |
4581 | 12 | |
1 | 2652 | 99 |
1276 | 67 | |
8762 | 53 | |
1252 | 12 |
I am getting this result because of the matrix is sorting based on the sum of total COlumn C for each Column A. Since the sum of Column C( for Column A=1) is 231 and the sum of Column C (for column A=2) is 253.
Is it possible to sort the matrix accordingly
Hi @AMAN560
actually, sum of Column C( for Column A=1) is 145 NOT 231 in your sample data.
by the way, I want to confirm that,
however, it's little messy to understand, just tell me the value you want to sort , e.g. you want to sort A by ASC and C by DESC.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
I am not aware of any straightforward approach to do this since you want to have something like the custom sort in Excel.
I would create a new calculation dependent on the values of the two columns and esnure that column A values will always be higher if it has the value 1.
Something like:
SortingField =
IF (
[Column A] = 1,
[Column A] * 1000000 + [Column C],
[Column A] + [Column C]
)
Add this measure to the matrix and make it almost invisible (very narrow) and use it for sorting.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |