Forum Discussion

gonrodrigues's avatar
gonrodrigues
Helper III
10 years ago
Solved

Sort slicer with text and dates

Hello!   Is there any way to sort this slicer with dates and text? text is fine, but dates are random.   Thanks    
  • waltheed's avatar
    waltheed
    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.