Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please help the to create status field based on date as per below. Attached source data.
Hi
try to use interval function to find date diff. and then create conditional statement to have year age group bucket.
Method 1:
like this
load *, if( Numberofdays<=31 or Numberofdays<=30 or Numberofdays<=28 or Numberofdays<=29, Dual('New Month',1),
if( Numberofdays >31 and (Numberofdays<=365 or Numberofdays<=366), Dual('1 Year',2),
if( Numberofdays >365 and (Numberofdays<=732 or Numberofdays<=731), Dual('2-3 Year',3),
if( Numberofdays >1460 and (Numberofdays<=1825 ), Dual('4-5 Year',4),Dual('>5 Years',5)
)))) as Bucket;
load *, Today()-[sales date] as Numberofdays;
LOAD [Cust ID],
[Sales ITM],
[sales date]
FROM
(ooxml, embedded labels, table is Sheet1);
Is it possible my month instead of days?