Forum Discussion
newpbiuser01
4 years agoHelper V
Slicer Custom Sort
Hello, I need to create a custom sort based for a slicer where the values are going to be all the fruits in the dataset and also an "All Fruits" option. I need to sort the column so the "All Frui...
- 4 years ago
You could create a table which will add new values when they appear as
New Table = var fruits = VALUES('Table'[Fruit]) return UNION( ADDCOLUMNS( fruits, "Sort order", RANKX(fruits, [Fruit], , ASC), { ( "All fruits", -1) } )
v-easonf-msft
4 years agoCommunity Support
Hi, newpbiuser01
'SortID' column is recalculated and created every time the data is refreshed.
If you want to automatically assign a Sort ID based on the time the record was added, then you have to consider adding a datetime column in your original datasoure as the basis for adding the SortID.
Best Regards,
Community Support Team _ Eason