Forum Discussion

MP-iCONN's avatar
MP-iCONN
Resolver I
4 years ago
Solved

Custom Date Slicer

I am struggling to figure out this exact custom date slicer. I have a report that needs two selectable options for a date slicer.  The first will be to select a date that is 4 weeks prior to today...
  • jdbuchanan71's avatar
    4 years ago

    MP-iCONN 

    You can add a column to your date table that calculates the week offset like this.

    Week Offset = - INT ( DIVIDE ( TODAY () - [Date], 7 ) )

    That will give us a column that is updated every time the model is refreshed so the days that are marked with week offset 0 to week offset -3 will shift as TODAY() shifts.

    Then you set up two bookmarks that change your date slicer only.  One is wide open, "Select a date".  The other applies a filter to the slicer where the week offset is <= 0 and >= -3. 

    Then attach the bookmarks to a bookmark navigation button.

    I have attached my sample file for you to look at.