Forum Discussion
Anonymous
8 years agoNot applicable
Relative date filtering, need last 3 years PLUS YTD.
I am trying to filter my data for my reports. I need the last full 3 years plus this YTD. Today is May 4, 2018. So I would want to see 1/1/2014 - 5/4/2018.
- 5 years ago
I know this is an old thread but putting this on anyways.
This 'Should' be something relative date could do but sadly doesn't. I created a calculated field on my date table called YearIndex
So the current year is 0 and the prior year is -1. Now you can just use the basic filter to get Current Year and Last year or however many years you want.YearIndex =VAR ThisYear = YEAR(NOW())RETURNDates[Year] - ThisYear
dbhudia
Advocate I
5 years agoI know this is an old thread but putting this on anyways.
This 'Should' be something relative date could do but sadly doesn't. I created a calculated field on my date table called YearIndex
So the current year is 0 and the prior year is -1. Now you can just use the basic filter to get Current Year and Last year or however many years you want.
YearIndex =
VAR ThisYear = YEAR(NOW())
RETURN
Dates[Year] - ThisYear
MatMatt
2 years agoFrequent Visitor
Amazing Solution! Thank you!