Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to create a trigger on the tab activation.
I have a field Date(format DD.MM.YYYY) and i would like to select all values from the past year to the previous month.
For example, today i would like the trigger to select only the values from February 2013 to February 2014.
Can someone help me to build the expression which could do this please?
The current month is in a variable Month and the current year in the variable Year.
Thanks,
Best Regards,
Loïc
Change your search string as below...
='>=$(=MonthEnd(Today(),-13))<=$(=MonthEnd(Today(),-1))'
Something like enclosed file?
If you want date from last year to today
i.e. 12/03/2013 to 11/03/2014 use
='>$(=AddYears(Today(),-1))' in expression with TempDate as Dimension (Select in Field)
You can also use
='>$(=AddMonths(Today(),-12))'
You may create a new field in the script as a YOY Flag using the below expression.
if(Date <= Today() and Date >= MonthStart(AddMonths(Date(Today()), -13)),1,0) as YOYFlg,
The new YOYFlag will be 1 if your Date is between today and last 13 months else it will be 0.
Now you can add action to a navigation button just Select in Field YOYFlag as 1.
Please take a look at the attachment.
Thank you for your very helpful answer!
But is this possible to select from last day of the previous month last year to the last day of the previous month this year (from 28/02/2013 to 28/02/2014)?
Change your search string as below...
='>=$(=MonthEnd(Today(),-13))<=$(=MonthEnd(Today(),-1))'
You can use MonthEnd function.
MonthEnd(AddMonths(Date(Today()), -13))