Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Day,
Below are my script to get previous month with current year less than of LPD date that will be tagged as Y else N, I used below script in script editor but I got wrong results.
IF(DATE(LPD,'MMM-YYYY') < Month(Addmonths(Today(),-1)),'Y','N') AS NON_STARTER
Please help me on this
Thanks
comparing date is not in same format
DATE(LPD,'MM/DD/YYYY')<monthstart((Addmonths(Today(),-1)))
Hi it works,
I got the month and year using below script, however out of calculation memory encountered after loading in app overview.
IF(MonthName(LPD) < MonthName(Addmonths(Today(), -1)), 'Y', 'N') AS NON_STARTER
Thanks
Date(..) is a format function that does not change the underlying value and does not produce a month number, so the comparison will not work correctly. I don't have much information on your data and I am not sure what your intent is, but perhaps you want something like one of these:
IF(LPD < MonthStart(Addmonths(Today(), -1)), 'Y', 'N') AS NON_STARTER
or
IF(Month(LPD) < Month(Addmonths(Today(), -1)), 'Y', 'N') AS NON_STARTER
The first expression can handle years. Or modify the second one to use MonthName(...) instead of Month(...)
comparing date is not in same format
DATE(LPD,'MM/DD/YYYY')<monthstart((Addmonths(Today(),-1)))
Hi it works,
I got the month and year using below script, however out of calculation memory encountered after loading in app overview.
IF(MonthName(LPD) < MonthName(Addmonths(Today(), -1)), 'Y', 'N') AS NON_STARTER
Thanks