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
jerryr125
Helper I
Helper I

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!

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.