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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
janine_hummel
New Member

Time Intelligence: How to create a time range between dynamic dates?

Hey guys, 

 

for a visualisation, I'm trying to set a time range for 10 days. This range is supposed to refresh itself as the days go by, showing only the last 10 days of the data table in the visualisation. 

 

 

I tried to accomplish this using the DATEBETWEEN function, with TODAY()-1 and TODAY()-10 as the date range. Unfortunately, DATEBETWEEN function won't allow using the TODAY parameter for this. 

 

Do you guys have an idea how to solve this problem? Right now, the visualisation is modified with a static date filtre which has to be renewed every day. 

 

 

1 REPLY 1
greggyb
Resident Rockstar
Resident Rockstar

DATESBETWEEN() certainly allows TODAY() with arithmetic as an argument. What error are you seeing when you try this?

 

DATESBETWEEN() does require a proper date dimension with consecutive, non-repeating dates.

// DAX
// fragment

DATESBETWEEN(
    DimDate[Date]
    ,TODAY() - 10
    ,TODAY() - 1
)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors