Forum Discussion
Sort slicer with text and dates
- 10 years ago
You are almost there...
Add another column with something like:
Table.AddColumn(HomologousMonth, "MonthSlicerSortOrder",
each if [CurrentMonth] then 999
else if [PreviousMonth] then 998
else if [HomologousMonth] then 997
else [MonthIndex])
And in your data model use this column as the Sort by column for the MonthSlicer column.
I have that column in my 'calendar' table (Month), but i need to use the 'MonthSlicer' column in slicer
MonthSlicer:
Table.AddColumn(HomologousMonth, "MonthSlicer", each if [CurrentMonth] then "Current Month" else if [PreviousMonth] then "Previous Month" else if [HomologousMonth] then "Homologous Month" else [Month])
You are almost there...
Add another column with something like:
Table.AddColumn(HomologousMonth, "MonthSlicerSortOrder",
each if [CurrentMonth] then 999
else if [PreviousMonth] then 998
else if [HomologousMonth] then 997
else [MonthIndex])
And in your data model use this column as the Sort by column for the MonthSlicer column.
- gonrodrigues10 years agoHelper III
Thank you so much! I didn't even know that i could sort a column using other as reference ^^ waltheed