Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create two date variables. First one, which is the maximum date based on a condition location=Dallas and another variable which is 12 months before the max date. How do I do it on this?
In script:
Temp_MaxDate:
LOAD
Max(DateField) as MaxDate
RESIDENT (YourExistingTable)
WHERE Location = 'Dallas';
LET vMaxDateDallas = Peek('MaxDate', 0, 'Temp_MaxDate');
LET v12MonthsBefore = MonthStart(AddMonths(vMaxDateDallas, -12));
=dayname(Max({1<Location={'Dallas'}>} DateField))
=addyears(Max({1<Location={'Dallas'}>} DateField),-12)