Forum Discussion
Sort in Matrix Visual
I am having issues sorting my data exactly like it is in this excel file. I even added a sort column to make it easier. I need the matrix to show the same exact sort order as the sort column. I tried different ways but had no luck achieving this. i added dummy data below along with a screen shot from Power BI. There is basic table visual and then matrix visual.
| Category | Brand | sub-brand | sales | SORT |
| Telephone | Girl | EE | 100 | 1 |
| Telephone | Girl | level | 654 | 2 |
| Telephone | Girl | MGR | 165 | 3 |
| Telephone | Girl | EXEC | 4654 | 4 |
| Telephone | Girl | EXEC | 54 | 5 |
| Telephone | Girl | blue | 23 | 6 |
| Telephone | Color | EE | 8748 | 7 |
| Telephone | Color | PLANT | 416 | 8 |
| Telephone | Color | MGR | 65 | 9 |
| Telephone | Color | VP | 98 | 10 |
| Telephone | Color | SENIOR | 926 | 11 |
| Telephone | Color | EXEC | 14 | 12 |
| Telephone | Color | blue | 6546 | 13 |
| Telephone | Turn | Company | 465 | 14 |
| Telephone | Turn | ABOVE | 4 | 15 |
| Telephone | female | Company | 21651 | 16 |
| Telephone | female | ABOVE | 64 | 17 |
| Telephone | turn color | Company | 996 | 18 |
| Telephone | turn color | ABOVE | 93 | 19 |
| Telephone | score | MIX | 69 | 20 |
| Telephone | score | Female | 45 | 21 |
| Telephone | score | POC | 21 | 22 |
| Telephone | score | front | -3 | 23 |
| Outreach | Fondant | Metrics | -27 | 24 |
| Outreach | Fondant | Comments | -51 | 25 |
| Business | SPEND | -75 | 26 |
I wanted to provide my work around I used incase anyone else gets stuck.
I used the Min of the Sort column as the last value on the matrix. I then sorted it and hid the column using this video: https://www.youtube.com/watch?v=1bp_e-ik7aA
8 Replies
- StefanoGrimaldiResident Rockstar
hey,
if you go directly to the table not the visual, you can dort the columns using a reference the sort column for the whole dataset, so when you get that data on the visual it will sorted,
if not also you can try to put the sort column a value field and in the options section of the visual you can sort the visual by that field values
- powerbihelp87Helper V
Thank you so much for the quick response!! The issue is that the Rows or table columns have duplicates which prevents Power BI to Sort By
- StefanoGrimaldiResident Rockstar
create a custom column that concatenate the category,brand, sub brand, delite the index column or try using the index column for the sort reference, or the custom column also. try both and see wicth works for u
- powerbihelp87Helper V
I wanted to provide my work around I used incase anyone else gets stuck.
I used the Min of the Sort column as the last value on the matrix. I then sorted it and hid the column using this video: https://www.youtube.com/watch?v=1bp_e-ik7aA