Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have periods in my data set formatted as 11/1/2017
The max period calculation is working
PERIOD = {"$(=Max(PERIOD))"}
But the previous period calculation is not
PERIOD = {"$(=Max(PERIOD)-1)"}
Any pointers here?
Thank you,
- dave
So, essentially you are going back a month? May be this
PERIOD = {"$(=AddMonths(Max(PERIOD), -1))"}
Hi,
what do you want exatly when you say -1 ? day -1, month -1, year -1 ?
So the periods are set up in a monthly fashion ... i.e
1/1/2017
2/1/2017
3/1/2017
etc ...
I want to sum({< PERIOD = {"$(=Max(PERIOD)-1)"}>} AMT)) ... so if the max period is 3/1/2017 I want to return AMT for 2/1/2017
So, essentially you are going back a month? May be this
PERIOD = {"$(=AddMonths(Max(PERIOD), -1))"}
when you do math operation on a date value the resultant will be an Integer value, so there is a data type mismatch
to avoid that you must specify your date format for the field PERIOD
example
$(=DATE(Max(PERIOD)-1))) or $(=DATE(Max(PERIOD)-1,'DD/M/YYYY'))
Works perfect thank you !!!