Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Cupola24
New Member

Get latest day data when report is loaded

Hi All,

 

Need your help on this Issue which I am facing.I am using date range filter/slicer on my report,

Cupola24_0-1727679772291.png

 

The issue is when I publish my report, the filter always shows the date on which I published the report, whereas what I want is that whenever the report is loaded, re-opened or refreshed it always shows me the latest day data (later if the user wants he can go back to previous dates to fetch results but by default it should show latest date data.

 

The report is created on data which is fetched via import mode, also the data on the report is refreshed daily on the power bi service early monring.

 

I tried creating a dax and using it into the filters pane for the latest data but it messes up everything and doesn't support our purppose.

 

Please guide and suggest what can we do, We don't want to swtich the filter to selection, dropdown etc. we want it to be range only.

1 ACCEPTED SOLUTION
rajasaadk_98
Helper I
Helper I

Solution: Use a Dynamic Relative Date Slicer alongside a Static Range Slicer

Since you want to stick to a range slicer, which retains the visual look (as shown in your image), we can set a workaround using dynamic filters or DAX measures to ensure the latest date is always selected initially.

Steps:

  1. Create a Dynamic Date Measure:

    • First, create a measure that dynamically calculates the latest date in your dataset.
    • Go to Modeling and select New Measure. Use the following DAX formula:
    DAX
    Copy code
    LatestDate = MAX(YourDateTable[Date])

    This measure will return the most recent date in your data.

  2. Add a Filter Based on Latest Date:

    • In your report, you’ll keep your range slicer. To ensure the default shows the latest data, do the following:
      • Add a page-level filter using this new LatestDate measure, and set it to the latest date. This will filter the page to always show the latest date by default, while allowing the user to adjust the range on the slicer afterward.
  3. Optional: Using a Bookmark for Default View:

    • After setting the slicer to your desired default state (i.e., with the date range starting from the latest date), create a Bookmark:
      • Go to View > Bookmarks and create a new one.
      • Set the bookmark as the default view. When users reopen the report or refresh the page, it will reset to this bookmark, displaying the most recent date.
  4. Publish to Power BI Service:

    • Once published, whenever the data is refreshed daily, the report will default to showing the latest date range without affecting the slicer appearance.

View solution in original post

5 REPLIES 5
rajasaadk_98
Helper I
Helper I

Solution: Use a Dynamic Relative Date Slicer alongside a Static Range Slicer

Since you want to stick to a range slicer, which retains the visual look (as shown in your image), we can set a workaround using dynamic filters or DAX measures to ensure the latest date is always selected initially.

Steps:

  1. Create a Dynamic Date Measure:

    • First, create a measure that dynamically calculates the latest date in your dataset.
    • Go to Modeling and select New Measure. Use the following DAX formula:
    DAX
    Copy code
    LatestDate = MAX(YourDateTable[Date])

    This measure will return the most recent date in your data.

  2. Add a Filter Based on Latest Date:

    • In your report, you’ll keep your range slicer. To ensure the default shows the latest data, do the following:
      • Add a page-level filter using this new LatestDate measure, and set it to the latest date. This will filter the page to always show the latest date by default, while allowing the user to adjust the range on the slicer afterward.
  3. Optional: Using a Bookmark for Default View:

    • After setting the slicer to your desired default state (i.e., with the date range starting from the latest date), create a Bookmark:
      • Go to View > Bookmarks and create a new one.
      • Set the bookmark as the default view. When users reopen the report or refresh the page, it will reset to this bookmark, displaying the most recent date.
  4. Publish to Power BI Service:

    • Once published, whenever the data is refreshed daily, the report will default to showing the latest date range without affecting the slicer appearance.
lbendlin
Super User
Super User

I am using date range filter/slicer on my report,

There's your issue - right there.

 

Use the filter pane instead, with relative date filtering.

Hi Ibendin, currently we are using the slicer only with relative date range selection. 

 

Kindly suggest a way in which the slicer is always set to the current date when the report is loaded, later if the user wants he can filter on last dates from the slicer.

 

We don't want to give user access to filter pane we have set it to not-readible. We want to handle this on the report only.

We don't want to give user access to filter pane we have set it to not-readible. We want to handle this on the report only.

I cannot assist you if you are preventing your users from using Power BI as it is intended. I hope someone else can help you further.

what you are saying still doesn't resolves the solution.

 

I want the report to automatically be loaded with the latest date whenever re-freshed or newly opened.

 

If you are suggesting to moe the date filter to the filters pane and it would serve the purpose, kindly share the steps to do it,will try and confirm.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.