Forum Discussion

cmkp2675's avatar
cmkp2675
Frequent Visitor
1 year ago
Solved

Default Slicer Selection and Trend chart help!!!

Hi Developers, I'm a newbie,   My requirement is:   1) In my report I'm using Date Slicer, by default the Date slicer should show Latest Date when it get refreshed and it should also show all th...
  • v-csrikanth's avatar
    1 year ago

    Hi cmkp2675 
    Sorry for the late response.
    There isn’t a way to have a “between” slicer default itself to the latest date dynamically. Power BI doesn’t support that out-of-the-box without bookmarks. Instead, here’s a reliable pattern that meets both of your needs:
    Please do follow the below steps that will resolve your issue:

    1. Swap your “Between” slicer for a Relative Date slicer set to “This 1 Days,” so it always defaults to today’s date

    2. In Format → Edit interactions, disable the slicer’s filter on your table visual so it continues to show every date row

    3. Create a measure that ignores any slicer and always sums the last 7 days, for example:
      -------------------------------------------------------------------------------
      LoadDurationLast7Days =
      CALCULATE(
      SUM('etl_pipeline_audit'[pipeline_run_duration_mins]),
      DATESINPERIOD(
      'Date_Table'[Date],
      MAX('Date_Table'[Date]),
      -6,
      DAY
      )
      )
      -------------------------------------------------------------------------------

    4. If needed, use Edit interactions to turn off slicer filtering on the trend chart so it consistently displays those seven days.

    If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
    Best Regards,
    Community Support Team _ C Srikanth.