Forum Discussion
sridharpolina
Helper I
4 years agoRelative date filtering including future dates
Hi, I am trying to dynamically filter a date which includes future dates as well. For Ex. For March 2022 I need a query which looks at the previous 12 months and the next 12 months (March2021-March20...
- 4 years ago
You could add a column to your date table for filtering purposes, something like
Within 24 month window = var startDate = EOMONTH( TODAY(), -13) + 1 var endDate = EOMONTH( TODAY(), 12 ) return IF( 'Date'[Date] >= startDate && 'Date'[Date] <= endDate, 1, 0)then add that filter to your visuals
sridharpolina
Helper I
4 years agoHi,
Thanks for your input regarding the dasheded line that worked. For the in between dates I am currently applying a manual filter as shown in the image to filter the date to show the view 'past 4 quarters > Current Date < future 4 quarters but i need to dynamically change the quarter based on current date instead of being a static filter. Attached is the manual filter I applied and a sample dataset.