Forum Discussion
Create a Next 12 month filter/Slicer function
Dear Community
I'm currently struggling on how to create a date filter that consist of the next year, where starting point should be todays date. I do already have a full functional calendar with all the dates from 2021 to 2031. What i now need, is a way tidentify all the dates that are equal tothe next 1 year including todays date ?
Does this make sense - i really can't figure out how to do it, i only manage to find help in regards to the previous 12 months.
Hi,
You can obiviously use relatiive date filtering, but I guess this is not what you are looking for.Here is one way to get a filter column:
1. Add today to your calendarToday = TODAY()
2. create helper tableDates Next 12Months =var _sdate = MAX('Calendar'[Today])var _edate = DATEADD('Calendar'[Today],12,MONTH) returnDATESBETWEEN('Calendar'[Date],_sdate,_edate)3. Create relationship and the following columnFilter column = IF(RELATED('Dates Next 12Months'[Date])<>BLANK(),1,0)I hope this helps to solve your issue and if it does consider accepting this as a solution!
1 Reply
- ValtteriNCommunity Champion
Hi,
You can obiviously use relatiive date filtering, but I guess this is not what you are looking for.Here is one way to get a filter column:
1. Add today to your calendarToday = TODAY()
2. create helper tableDates Next 12Months =var _sdate = MAX('Calendar'[Today])var _edate = DATEADD('Calendar'[Today],12,MONTH) returnDATESBETWEEN('Calendar'[Date],_sdate,_edate)3. Create relationship and the following columnFilter column = IF(RELATED('Dates Next 12Months'[Date])<>BLANK(),1,0)I hope this helps to solve your issue and if it does consider accepting this as a solution!