Something like this might work:
IF DATEDIFF('year', [Date], Today()) = 0 THEN "Current Year"
ELSEIF DATEDIFF('year', [Date], Today()) = 1 THEN "Previous Year"
The bottom line is that you need to anchor a calculated field off of the current year.
Hi Russ Lyman,
Thanks for the reply!!.
My requirement is , when you are Drag the date field into Filter shelf and click to show filter then by default filter should check with current year and show data.
is there a way to achieve this.
That is the way you would have to do it. You can't make the selection dynamic when you are just showing the year as a filter.
User wants to see the dynamic selection default by current year , when dash board opens .
I tried the above mentioned , but it is working as just like Quick filter .
Please suggest if we can do it in any other way
Please let me know if you find any solution.