Forum Discussion

lauriedata's avatar
lauriedata
Resolver I
9 months ago
Solved

2 default dates in slicer

    Is there a way to have the most recent two dates be a default choice in a slicer, not just one?  I can't have them combined into a "last 2 days" choice UNLESS I CAN ALSO have the last two dates...
  • parry2k's avatar
    9 months ago

    lauriedata you should have a new column for default selection and use that as a slicer:

     

    New Column for Slicer = 
    VAR __Today = TODAY ()
    VAR __Date = 'Calendar'[Date]
    RETURN
    SWITCH ( 
        TRUE (),
        __Date = __Today, "Current Date",
        __Date = __Today - 1, "Prev Date",
        __Date
    )

     

     

    Select "Current Date" and "Prev Date" in the slicer; these will be the default selection for every day, and users can pick one if required.

     

  • v-aatheeque's avatar
    v-aatheeque
    9 months ago

    Hi lauriedata 

    Just checking in to see if the previous response helped resolve your issue. If not, feel free to share your questions and we’ll be glad to assist.