Forum Discussion

AmyD's avatar
AmyD
Helper I
3 years ago
Solved

Reordering values

I have a column in Power Query labelled 'priority'. There are 3 values: high, medium, low. When I create a table, I drag in the 'priority' column; however, it automatically orders them alphabetically...
  • ToddChitt's avatar
    3 years ago

    You should create a simple lookup table. On the Home tab, look for the button "Enter Data". Creat a table with three rows:

    High    1

    Medium     2

    Low          3

    After that, set the Sort Order column of the text field above to the INT field in that table. Lastly, join that table to the table that contains those values. Display the Text from this table instead. Power BI will then sort them by the INT in this lookup table.

    Another method: Create a calculated column in your table with something like this:

    Priority Sort = IF [Priority] = "High", 1, IF ( [Priority] = Medium, 2....)

    And sort Priority by Priority Sort.