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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Rosh89
Helper I
Helper I

Need date range filter to automatically update with yesterday's date on a daily basis

Hi,

 

I have a sales report published in service which shows sales for the year 2022. I have a date slicer which is as shown below 

 

Rosh89_0-1646223079273.png

 

The date on the left (1/1/2022) should not change and the date on the right (1/3/2022) should update everyday with yesterday's date when a report is being sent today. Is there a way I can accomplish this using DAX in desktop and need not worry about changing the date manually in service everyday?

 

Thanks in advance.

 

Regards,

Rosh

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @Rosh89 ,

 

I think you can create a DimDate table by "Calendar" function in Dax.

Date = 
CALENDAR(DATE(2022,01,01),TODAY()-1)

It will always show dates in range from 2022/01/01 to yesterday.

1.png 

 

Best Regards,
Rico Zhou

 

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

Hi @v-rzhou-msft,

 

I tried what you suggested but it does not work for sending emails automatically on a daily basis. The date slicer will always show the date the report was published from desktop to service. 

 

Best Regards,

Rosh 

amitchandak
Super User
Super User

@Rosh89 , As far as I know, you can not initialize date range slicer. You can log an idea https://ideas.powerbi.com/ideas/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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