Forum Discussion
Custom Sort Attribute row in unpivot matrix
- Anonymous5 years ago
Hi therenjithr ,
Here are the steps you can follow:
You can sort according to the customization of Power query.
1. Enter Power query through Transform data, select Add Column – Column From Examples – From All Columns.
2. Enter Index123 corresponding to ABC in the column next to it.
3. Select column [Attribute], Column tools – Sort by column – column [Custom].
4. Select Sort ascending in the column [Custom].
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
You'll need to add a Sort By column to do that.
Sort one column by another column in Power BI Desktop - Power BI | Microsoft Docs
Pat
This is the actual format of data. I created another table with index column and column name and then did the mapping in model. But in the visualization sorting doesnt work unless I add "Sort Column" as either in rows or columns.
| Dates | ColumnName | Values | SortColumn |
| 8/1/2021 | A | 234 | 0 |
| 8/1/2021 | B | 135 | 1 |
| 8/2/2021 | A | 4123 | 0 |
| 8/3/2021 | B | 35 | 1 |
| 8/4/2021 | B | 233 | 1 |
| 8/5/2021 | C | 456 | 2 |
| 8/5/2021 | C | 243 | 2 |