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) } )
johnt75
4 years agoSuper User
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) }
)