Forum Discussion
Order text value using numeric values for a matrix visual to show most or less critical text value
Hi everyone, big noob and first post.
I've searched everywhere but cannot figure out how to do this:
i have a data layout and a matrix visual element. In this matrix i have 3 levels that i can expand or collapse (let's just call them 1,2 and 3). When level 3, for example, is collapsed on 2 i can see the "subtotal" of every element in level 3 of that section and that's what i want.
Problem is: when the attribute is text (high, medium, low for example) i cannot find a way to give Power BI a hierarchic order to get them straight. What i mean is, i can use "prime" or "last" of course but it is only a workaround when values casually align in alphabetic order.
Isn't really there a way to give power BI (or the visual i'm using) the instruction: low=1, medium=2 and high=3 to use it as a way of showing the max or min value when section are collapsed?
I tried creating a conditional column but it does not resolve this issue unless i use that as value, and that's not what i want (or my client wants, fort what it's worth).
thanks so much, hope i was clear enough since i am no IT pro nor english is my mother tongue
2 Replies
- rsbinCommunity Champion
What you need to do is use the Sort by Column icon under Column Tools.
You can either create a column in your data table and call it SortOrder or create a new Dimension table and create a relationship with your main table.
Category SortOrder High 3 Medium 2 Low 1 Now select the column in your main table, click on column tools, the click on Sort by Column and choose this new SortOrder column.
This should solve your issue.
Regards,
- UltraNoobRegular Visitor
First of all, thanks for your answer.
I created a new table via "insert Data" (not sure if it's correct, i'm using the italian version of the application), insert my data (Baseline, Basline+, Baseline++ and 1,2,3). Linked category column with my cloud data criticality column in the table i need to associate values to.
BUT, when i click on "Sort By column" after selecting the correct column in main table, i can only choose between columns of the same table. There's no "SortOrder"column in the menu.
Is there something wrong in my procedure?
Also, maybe a stupid question: isn't this only gonna order my table rows based on the value i gave to my categories, instead of showing "Low" instead of "medium" in a matrix based on the value i chose?
(again, sorry for not being totally clear but language barrier + data science illiteracy are not a good match in this case)