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

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

Reply
Anonymous
Not applicable

Dynamic Date Filter: Use Relative Date Filter to drive dates in separate visual?

Hey everyone, 

 

I am currently working on a Weather Data Report. Here is what it contains: 

  1. In my top visual I am grabbing the hourly average temperature over the next 7 days per zip code using a Relative Date Filter.
  2. In the bottom visual, im using a SQL query to grab the daily historical average temperature for each distinct date available.

 

This is where I need you guys. Is it possible to grab the dates that the next 7 days relative date filter is using (top visual) and applying those to the bottom visual minus 1 year? Basically I just want to grab whatever dates are in the top visual, and apply those same dates to the bottom visual but for the previous year.  

 
 

Any ideas? 


weather.PNG

6 REPLIES 6
Tad17
Solution Sage
Solution Sage

Hey @Anonymous 

 

You can try using a measure with the SAMEPERIODLASTYEAR function in DAX: https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax

 

Let me know if that helps.

Anonymous
Not applicable

I can definitely use that if i find a dax formula that can imitate what my relative date filter is doing. So ill need a dax formula to grab the current data and the next 7 days. Once i figure that out i should be able to use SAMEPERIODLASTYEAR

 

Thanks @Tad17 

@Anonymous Is this what you're looking for: https://docs.microsoft.com/en-us/dax/dateadd-function-dax

 

P.S. You can also use TODAY() in DAX.

Anonymous
Not applicable

@Tad17  Thank you! This seems to be on the right track. Ill post if its the solution. I appreciate it

fhill
Resident Rockstar
Resident Rockstar

Can you create a new custom column from your Zip Data equal to the Date less 1 year?  Then use that Custom column as part of the SQL query to pull in only the dates you want?

 

FOrrest




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Anonymous
Not applicable

I'll look into that real quick. Thanks @fhill 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.