Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi -
Question. I have a page in my Power BI application in which I would like to have the visualizations default to a specific slicer value.
I have a slicer that lets user select the week # and of course, the visualizations on the page change as one or many week #'s are selected. BUT, is there a way in which to default the page to the greatest (max) value of the week # and then have the users proceed in the selecting the specific week #s from there (like if they wish to go back in time).
Any thoughts ? Jerry
Solved! Go to Solution.
Here is the general approach. Adjust as needed
- create a string representation of your date column, replace the latest date with a string "Latest"
- sort that new column by the original date column
- add a slicer or visual/page/report level filter
- set the filter to "Latest"
- publish the pbix to the workspace/app
Yes, you can definitely set a slicer to default to the maximum value (e.g., the latest week) in Power BI, and then allow users to select other week numbers from there. Here's how you can achieve this:
Create a Measure for the Max Week:
Use the following DAX expression to create this measure:
Use the Measure to Filter the Visuals:
Add a Slicer for Week Selection:
Here is the general approach. Adjust as needed
- create a string representation of your date column, replace the latest date with a string "Latest"
- sort that new column by the original date column
- add a slicer or visual/page/report level filter
- set the filter to "Latest"
- publish the pbix to the workspace/app
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |