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.
I have the following matrix where some of the columns have the same values as some of the rows (x,y,z,a,b,c). Inside there are values of a measure
a | b | c | d | x | y | z | |
a | 1 | 3 | |||||
b | 1 | 2 | |||||
c | 1 | ||||||
x | 3 | 1 | |||||
y | 3 | 1 | |||||
z | 1 |
What I would like is to sort the columns so it will first include the same names we have in the row and I'll get a diagonal of 1's. Something like this:
a | b | c | x | y | z | d | |
a | 1 | 3 | |||||
b | 1 | 2 | |||||
c | 1 | ||||||
x | 1 | 3 | |||||
y | 3 | 1 | |||||
z | 1 |
Any thoughts?
Solved! Go to Solution.
It will help. You have to maintain a column with the required SortOrder and then use the SortByColumn to sort those columns using the SortOrder that you have maintained.
This will result in sorted Rows and Column headers in the same order as required by you and the "diagonal ones" etc... will be formed automatically.
The problem is I am not able to understand the following from your post.
1) Are you using the same field of any table for both Rows and Columns of a matrix visual?
2) What is the formula of the measure you have used in the visual?
3) What is your source table structure?
Without giving this, I think it is difficult to understand the source of the problem. More info will help.
I did, but it won't help me in this case I think
It will help. You have to maintain a column with the required SortOrder and then use the SortByColumn to sort those columns using the SortOrder that you have maintained.
This will result in sorted Rows and Column headers in the same order as required by you and the "diagonal ones" etc... will be formed automatically.
The problem is I am not able to understand the following from your post.
1) Are you using the same field of any table for both Rows and Columns of a matrix visual?
2) What is the formula of the measure you have used in the visual?
3) What is your source table structure?
Without giving this, I think it is difficult to understand the source of the problem. More info will help.
You're right!
Thanks!
However, I succeeded only once I made a group by on a measure in other table and added a column adding space before a barber that was on the diagonal according to the group by. It wasn't straightforward in this case so if any better idea comes up - it will be great!
Thanks for insisting 🙂
Hi
thanks!
You can find the example here
https://community.powerbi.com/t5/Desktop/Comparing-field-to-itself/m-p/709143#M342407
Eventually - I'd like the barbers to be in diagonal and then the rest of them will be ordered after them
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |