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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
jerryr125
Helper II
Helper II

Page - default value for slicing the data

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

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User


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

View solution in original post

2 REPLIES 2
rajasaadk_98
Helper I
Helper I

 

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:

Steps to Default a Slicer to the Maximum Week Number:

Option 1: Using a Measure for the Max Week Number

  1. Create a Measure for the Max Week:

    • Go to the Data view and make sure you have a Week Number column in your data (if not, create one).
    • Create a new measure to get the maximum week number.

    Use the following DAX expression to create this measure:

    DAX
    Copy code
    MaxWeek = MAX(YourTable[WeekNumber])
  2. Use the Measure to Filter the Visuals:

    • Add this measure as a visual filter to all your visuals. Set it to filter for Week Number equals MaxWeek.
  3. Add a Slicer for Week Selection:

    • Add a Week Number slicer to the page. This will allow users to change the week as needed.
    • The visuals will load with the latest week (MaxWeek) by default, but users can change the selection to any week they prefer.
lbendlin
Super User
Super User


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

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.