Forum Discussion
Get latest day data when report is loaded
- 1 year ago
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:
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:
DAXCopy codeLatestDate = MAX(YourDateTable[Date])This measure will return the most recent date in your data.
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.
- In your report, you’ll keep your range slicer. To ensure the default shows the latest data, do the following:
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.
- After setting the slicer to your desired default state (i.e., with the date range starting from the latest date), create a Bookmark:
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.
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.