Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am comparing yesterday to the same day last year and am trying to find a better way to achieve this. At the moment I am using select in field for 'week of year' and 'day of week'r. This falls over at this time of year though as Week 52 or Week 1 does not cross over between years.
At some stage I will need to look into the fault in the calendar but for the moment I just need a workaround. I know if I manually select the two dates I am interested in it works but as the select in field is part of an automatic process I need to set this up as a trigger.
So far I have got max(FullDate) and max(FullDate)-364 working individually but how do I combine these into a single trigger?
Thanks in advance,
Julian
You could use a search-expression like this one - you need only to adjust the date-format to the format from your date-field:
= '(' & date(today()-1, 'DD.MM.YYYY') & '|' & date(today()-364, 'DD.MM.YYYY') & ')'
- Marcus
You could try it with two expression like:
sum({< Date = {"=date(today()-1)"}>} value) // yesterday
sum({< Date = {"=date(today()-1 - 364)"}>} value) // same weekday in previous year
Another possibility might be to use daynumberofyear() - maybe within a master-calendar: How to use - Master-Calendar and Date-Values
- Marcus
Hi Marcus, Those expressions would work as well but how do I combine them in a select in field trigger to choose both dates?
You could use a search-expression like this one - you need only to adjust the date-format to the format from your date-field:
= '(' & date(today()-1, 'DD.MM.YYYY') & '|' & date(today()-364, 'DD.MM.YYYY') & ')'
- Marcus
Thanks Marcus I was missing the brackets in my expression.