Forum Discussion
Power BI- Order Column with Repeative Values
I have 2 Columns, I am able to Sort Category Column by category ID but, Each Category has Position in it, and I also have PositionID against them and wants to sort Position by Category and PositionID
Data is in below format.
How can I sort Position for each Category. ( Position do repeat for Different Category), so that when I put Category in Slicer , and Position in Report, I get Position is sorted Order by every Category Selected in Slicer.
5 Replies
- DaviejoeMemorable Member
You could create a custom column with the below formula to give you a unique sort/index column
= ([Category ID] * 100) + [Position ID]
- vanessafvgCommunity Championyou can create an index colum
create a new column
id = int(table[category] & table[position])
and then sort by id- AnonymousNot applicable
Not very Clear with your solution, Category and Position are text Column ?
Also Created index Column will not order Position Column in Specific order we want ,
Can you share more detail ,if I am missing anything from ur post?- vanessafvgCommunity Champion
have you tried to use the calculated column that i suggested?
Can you specify what you are unsure of? it is not a text column as it is converted into an int, therefore the concatenation of the ids will sort it by number order in the order of the sequence of numbers. However you will need to put it in your visual.