Forum Discussion

Flo1's avatar
Flo1
Icon for Advocate I rankAdvocate I
4 years ago

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:

CategorySubcategoryValue
Key
Az1201
Ax1302
Bz4443
By

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:

 

SubcategoryValue
z120
x130

 

SubcategoryValue
z444
y99



How can I achieve this?

 

2 Replies

  • 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.

     

     

     

  • Anonymous's avatar
    Anonymous
    Not 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.

    Custom Sorting in Power BI 

    Regards,

    Xiaoxin Sheng