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

Dynamic Date Range

Hi everyone,

 

I'm still learning Power Bi so this may be a simple solution, but I have a report where I'm using DateTime.LocalNow() so the report shows the last refresh date on the date the report is refreshed. I also have a date range to show what data is included in the report. The date range is 3 months behind the current date (so refreshing today would show 3/29/2022 and a date range of 01/01/2021-12/31/2021). Currently the date range has to be updated manually every month. I'm wanting to make this dynamic so when the report is refreshed in April I won't have to manually go in and update the date range. I'm having trouble figuring out a dynamic way to show the rolling 12 months 3 months behind, while keeping the range between the first and late day of the month. Below may help in what I'm looking to do:

 

Thank you for any help you can give!

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@dgilm33 

is this what you want?

Date Range = 
EOMONTH('Table'[Current Date],-15)+1 &"-"& EOMONTH('Table'[Current Date],-3)

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@dgilm33 

is this what you want?

Date Range = 
EOMONTH('Table'[Current Date],-15)+1 &"-"& EOMONTH('Table'[Current Date],-3)

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.