Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I created a matrix and below is the format
| Attributes | 8/1/2021 | 8/2/2021 | 8/3/2021 | 8/4/2021 | 8/5/2021 |
| A | 234 | 234 | 23 | 23 | 689 |
| B | 45 | 345 | 234 | 234 | 689 |
| C | 3 | 345 | 234 | 234 | 689 |
but I want to custom sort the rows like below. Please help
| Attributes | 8/1/2021 | 8/2/2021 | 8/3/2021 | 8/4/2021 | 8/5/2021 |
| C | 3 | 345 | 234 | 234 | 689 |
| A | 234 | 234 | 23 | 23 | 689 |
| B | 45 | 345 | 234 | 234 | 689 |
Solved! Go to Solution.
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
I do not had to do step 2, but I used merge query to add mapped column from related table in actual table then followed ur steps on sorting, did the trick. Thanks for your effort.
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
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 |
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.