Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I created the following variable: v30DaysOld = Date((Today()-30))
It does calculate 30 days earlier but I want it to calculate 30 work days earlier.
I do have a Field called "DAY_TYPE" that includes WorkDay, Holiday, Off_Friday and Weekend.
So I have been trying this on my variable: v30DaysOld = ({$<DAY_TYPE={'WorkDay'}>}Date(Today()))-($<DAY_TYPE={'WorkDay'}>}30)
I know I am doing something wrong here. Can anyone give me some guidance on how I can write this statement properly so that my variable will only minus 30 work days instead of minus 30 days?
May be Try this?
LET v30DaysOld = Only( {$< DAY_TYPE = {'WorkDay'}>} Date(Today()) ) - 30 ;
May be use FirstWorkDate() or LastWorkDay() function here
Hi Amber
Please share your calendar or date fields.
The set analysis on constant like 30 does not work
And there is nothing to filter when you select today ()
Regards
Sasi
Please try as below;
1)write below let statement in script editor.
let vToday=today();
2)run the script
3)take a text box and try the below expression:
=makedate(year(today()),month(AddMonths(today(),-1)),(day(vToday)-30)*(-1))