Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
attached Qvw and written inline source below
am trying to create close out field using below statement but failing
if(len(trim(date([BeginDate])))=0 and len(trim(date([EndDate])))=0 , this means if both BeginDate & EndDate are null consider item 12 as close out
if(len(trim(date([Begin Date])))>0 , starting this date item 1234 falls under close out
if(len(trim( date([Begin Date] and date([End Date]>0)))),'Closeouts','Excl Closeout'))) as Closeout
between this dates item 12345 should fall under this criteria
all other scenarios like item 123 should fall under Excl Closeout
Source
load*
inline
[Item,BeginDate, EndDate
12, ,
123,-1, ,
1234,02/15/2018,
12345,02/17/2018,05/16/2018];
Please help
thanks,
D
I think the following meets your criteria:
between this dates item 12345 should fall under this criteria all other scenarios like item 123 should fall under Excl Closeout
Script:
Source: load *, if(len(trim([BeginDate]))>0 and len(trim([EndDate]))>0,'Closeouts','Excl Closeout') as Closeout inline [ Item,BeginDate, EndDate 12, , 123,-1, , 1234,02/15/2018, 12345,02/17/2018,05/16/2018 ];
Output:
Item | BeginDate | EndDate | Closeout |
12 | Excl Closeout | ||
123 | -1 | Excl Closeout | |
1234 | 2/15/2018 | Excl Closeout | |
12345 | 2/17/2018 | 5/16/2018 | Closeouts |
Hello Nicole,
This scenario worked only for Item 12345, except 123 with -1 begin date everything should fall under closeouts.
Example:
Thanks,
D
Can you please give what you want the final table to look like? I can help write the code for it, but only if I can understand what the final output should look like.