Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hey everyone,
I am currently working on a Weather Data Report. Here is what it contains:
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?
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.
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.
@Tad17 Thank you! This seems to be on the right track. Ill post if its the solution. I appreciate it
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
Proud to give back to the community!
Thank You!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |