Forum Discussion
Anonymous
6 years agoNot applicable
DAX to create a date filter
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
amitchandak
Super User
6 years agoAnonymous ,
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))
- Anonymous6 years agoNot applicable
Thanks Amit