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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
rahul_verma77
Frequent Visitor

Default State For Between Date slicers

Hi All,

 

I got a new requirement where-in when ever I open my POWER BI report in the service, the date slicer should be in today i.e both start Date and end Date should point only to today.

Right now as I can see POWER BI by default goes to the last used date by the last user.

 

Can we do something in desktop or is it by default like even the pages go to the last used/viewed page only 

@PowerBI 

Thanks

1 ACCEPTED SOLUTION
v-yohua-msft
Community Support
Community Support

Hi, @rahul_verma77 

 

In addition to IBendlin's approach, you might also take advantage of the Relative Date Slicer feature in Power BI, which dynamically adjusts to always include the day's data.

 

In Power BI Desktop, create a slicer visual in your report and select a date field for the Field value.
Select the slicer, and then in the Format pane, under Visual > Slicer Settings >Options, change the Style to Relative Date.

 

vyohuamsft_0-1708931765118.png


Configure the slicer to display "This" and select "Days" as the date measure. This setting will ensure that the slicer defaults to today's date and updates dynamically every day.


For more detailed instructions on setting up a relative date slicer, please refer to the official documentation:

 

Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn

 

The relative date slicer is automatically updated to include only the data for the current day, ensuring that the solution is dynamic. This means that every time you open or refresh a report in the Power BI service, the slicer will default to today's date without any manual intervention.

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-yohua-msft
Community Support
Community Support

Hi, @rahul_verma77 

 

In addition to IBendlin's approach, you might also take advantage of the Relative Date Slicer feature in Power BI, which dynamically adjusts to always include the day's data.

 

In Power BI Desktop, create a slicer visual in your report and select a date field for the Field value.
Select the slicer, and then in the Format pane, under Visual > Slicer Settings >Options, change the Style to Relative Date.

 

vyohuamsft_0-1708931765118.png


Configure the slicer to display "This" and select "Days" as the date measure. This setting will ensure that the slicer defaults to today's date and updates dynamically every day.


For more detailed instructions on setting up a relative date slicer, please refer to the official documentation:

 

Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn

 

The relative date slicer is automatically updated to include only the data for the current day, ensuring that the solution is dynamic. This means that every time you open or refresh a report in the Power BI service, the slicer will default to today's date without any manual intervention.

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes , this would definetly work but in my case I am not restricting date to be in last n numbers hence this would not be useful , also when we open the report this will show last used date rather than pointing the entire report to yesterday 

rahul_verma77
Frequent Visitor

Thanks for the suggestion,will look into this .

But is this solution permanent and can it be dynamic? like everyday the url changes to yesterday's date

Can be dynamic.  You might even be able to do that in ODATA directly.  Might - as the Report URL only implements a subset of ODATA.

Great , 

Can we have something in the service  or desktop itself where its visible as soon as the end users open teh report rather than doing changes in the URL. 

Please refer to my first comment.  Not recommended.

lbendlin
Super User
Super User

The cruel way to do that would be to not allow report users to store their filter choices.  Very much not recommended.

 

One alternative is to use a  Report URL filter. You would have to check how that impacts the user experience.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Solution Authors
Top Kudoed Authors