Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have ORDERDATE in the script (as YYYY-MM-DD). I want have a graph where I can see how many orders I have with 50-100 days between Today and Orderdate, how many with 100-200 days between Today and Orderdate and so on. I tried to count the days in the script, also using Interval, but didn't get it to work. What to do?
Perhaps this?
If((Today() - ORDERDATE) >= 50 and (Today() - ORDERDATE) <= 100, Dual('50-100', 1),
If((Today() - ORDERDATE) >= 100 and (Today() - ORDERDATE) <= 200, Dual('100-200', 2)))
Perhaps this?
If((Today() - ORDERDATE) >= 50 and (Today() - ORDERDATE) <= 100, Dual('50-100', 1),
If((Today() - ORDERDATE) >= 100 and (Today() - ORDERDATE) <= 200, Dual('100-200', 2)))
Hi Mariana,
In addition you could also use a class function to create a new field. The only thing is that the groups are equally spaced in terms of the numbers of days,
LOAD *,
Class(Today()-ORDERDATE, 50, 'days') As OrderDays;
LOAD ... or the Order table
I hope this helps,
Cheers,
Luis
Thank you!