Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
Can anyone help me with creating a date filter to include all dates in the range of past 6 months and next 6 months relative to today's date..assuming date_dt is the date field
Hi @Anonymous ,
You could refer to @amitchandak ' suggestions, or you also could try to +/-180 days like below
Measure = CALCULATE(SUM(t2[amount]), FILTER(t2, t2[date]<=DATE(YEAR(TODAY()), MONTH(TODAY()), DAY(TODAY())+180)&& t2[date]>=DATE(YEAR(TODAY()), MONTH(TODAY()), DAY(TODAY())-180)))
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Zoe Zhi
@Anonymous ,
Measure =
var _min = date(year(today()),month(today())-6,day(today())) /// or date(year(today()),month(today())-6,1)
var _max = date(year(today()),month(today())+6,day(today())) /// eomonth(date(year(today()),month(today())+6,day(today())),0)
return
calculate([measure],filter(All(DATE), Date[Date] >=_min && Date[Date] <=_max))
Thanks Amit
Thanks Nandu
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.