Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 months ago
Solved

Dates Between slicer default value to MAX date

I have a Dates Between slicer on the canvas and the requirement is by default it should show MAX and MAX-1 date whenever a user opens a report. How can I achieve this?
  • MasonMA's avatar
    MasonMA
    8 months ago

    If your Calendar table is built from MIN/MAX of the fact, then the slicer’s max is already aligned to your data, but Power BI does not provide a supported way to force a Between date slicer’s handles (From/To) to default to a relative range like 'MaxDate-1', 'MaxDate' each time a user opens the report. The Between slicer will default to the full available range unless the report is saved with a selection, and it won’t “recompute” that selection as “latest two days” on open.

     

    I'd suggest using 'Relative Date' slicer set to “in the last 2 days” or “last 1 day” depending on inclusivity. This dynamically evaluates on open/refresh.