Forum Discussion
sort by custom Index order
- 10 years ago
kfschaefer I can see the SortID was created in the Query Editor - that will not affect this!
What I suggested is to concatenate the 2 Columns in the Data View and then use that new concatenated column for your slicer
the concatenated column is a new column with a new name - thats why it has ! at the end
in the Data View => Modeling Tab => click New Column => type Live Range! = .....
kfschaefer I beleive the issue you are having is to do with telling PBI how to sort. In PBI desktop click on the data button (looks like a table):
Then click the modelling tab in the ribbon. In the picture above you can see a button called Sort By Column. If you select table 'LiveRangeList' and then select column [Live Range] the Sort by column button will then allow you to sort the Live Range column by the SortID. This will maintain the desired sorting you require.
If this doesnt make sense please let me know.
Thanks,
Giles
I already did that - the issue is when I change the table visualization to a slicer the sort order does not hold.
K
- Sean10 years ago
Community Champion
If you don't mind the numbers in the slicer try concatenating the 2 columns. This will guarantee they'll be sorted the way you want!
- kfschaefer10 years ago
Helper IV
Thank you for the suggestion, however my SortID is a calculated field and cannot be using in the suggested method:
= Table.AddColumn(#"Filtered Rows", "SortID", each if [Lives Range]="0-100" then 1 else( if [Lives Range]="101-500" then 2 else( if [Lives Range]="501-3000" then 3 else( if [Lives Range]="3000+" then 4 else( if [Lives Range]="New" then 5 else( if [Lives Range]="Runout" then 6 else 999))))))
I am also having the same issue with the Months Slicer. When I convert the table to slicer I loose the correct sort order.
- Sean10 years ago
Community Champion
kfschaefer I can see the SortID was created in the Query Editor - that will not affect this!
What I suggested is to concatenate the 2 Columns in the Data View and then use that new concatenated column for your slicer
the concatenated column is a new column with a new name - thats why it has ! at the end
in the Data View => Modeling Tab => click New Column => type Live Range! = .....