Hello,
This is a thread that continues from the following post: https://www.telerik.com/forums/filter-graph-data
To give a default value to a graph, I have used this expression in the report parameter:
= AddMonths(Last(Fields.wDate), -12)
The above displays the past 12 months of data on a graph which has 5 years (60 months) of data.
However, the data that I have does not include weekends and public holidays. So in scenarios such as:
Latest date (Last(Fields.wDate)) is 2nd March 2020, and the 12 month previous data is from 2nd March 2019. 2nd March 2020 is on a Monday so data is recorded, but 2nd March 2019 was on a Saturday hence there is no data on it, which results in an error saying 'Missing or invalid parameter value. Please input valid data for all parameters.'
Is there a way where, if the -12 value is on a weekend or public holiday, it picks the data closest to it, for e.g. 4th March in this case. Or alternatively a function where I just get the latest year's worth of data by default? I have tried = Today().AddMonths(-12) but it also has the same issue.
I have also attached a screenshot of my report parameter.
Thank You