Forum Discussion
How to solve "Sort by another column" issue?
Hello there,
I need help for the following issue:
I have a model Table in Power BI, say:
| Category | Subcategory | Value | Key |
| A | z | 120 | 1 |
| A | x | 130 | 2 |
| B | z | 444 | 3 |
| B | y | 99 | 4 |
I need to sort "Subcategory" by a Key Column, but get the issue, that it is not possible to sort a Subcategory value by more than one value.
In my Report I have two tables shown, one for Category A and one for Category B (no its not possible to show all data in the same table here) and I display Subcategory and the Value-column but I need the correct order in my table (not alphabetically by Subcategory), like:
| Subcategory | Value |
| z | 120 |
| x | 130 |
| Subcategory | Value |
| z | 444 |
| y | 99 |
How can I achieve this?
2 Replies
- speedramps
Super User
What logic do you want to use for sorting Z which is both a 1 or 3?
Do you want to use min, max or average.
- AnonymousNot applicable
HI Flo1,
You can create a custom table with unique field values and sort order index, then you can link to the raw table field and use the new table field instead to apply for the custom sort orders in visuals.
Regards,
Xiaoxin Sheng