Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Please tell me the solution for OrderDate need to convert into Convert the dates into buckets like ,30 days, >30 days to< 60 Days, >60 days to < 90 days and >90 days from today
OderDate format is DD-MM-YYYY hh:mm:ss ffff tt
Kindly suggest me where can i create the buckets of days in dimension or script and please provide me the logic
and OrderDate has contain 2001 to 2031 years of dates but in need to implement it should display based on current date if we select any date then it should select based on the selected date.
Hi @narayanaqlik ,
You can use the below
Load
if((today()-orderdate)>0 and (today()-orderdate)<=30, '0-30 days',
if((today()-orderdate)>30 and today()-orderdate)<=60 , '30-60 days',
if((today()-orderdate)>60 and today()-orderdate)<=90 , '60-90 days',
if(today()-orderdate)>=90,'90+ days')))) as orderdatebucket,
*
resident of table where orderdate >= today();