Effectively what I am trying to do is create a flag in the load script similar to using the InYearToDate function for a YTD option, however this only works if you are looking at the current year and I have graphs that show CY and prior years.
So for example, let's say it is May, I would like a filter pane where I can have everything with a date where the month is January, February, March or April to be selected, regardless of the year for one value (e.g. -1) and then everything else is another value. The field needs to be dynamic and I can't simply create a month filter and select these manually.
I have used the below formula to do this to create year to date, but it doesn't work if the graph has multiple years. Any ideas?
InYearToDate(Renewal_Date,(monthend(addmonths(Today(),-1))),0)*-1 as YTD