Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Thanks in advance...
Difficult to answer without mock data; but let me try !
I'll assume you have a table as follow :
Table:
load
ID, DateField, SomeData from source;
What I would do :
create 2 variables one for minDate and one for MaxDate
Temp:
Load
min(DateField) as minDate,
max(DateField) as maxDate
Resident Table;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
drop table Temp;
That done :
we could do something like this :
noconcatenate
load *,
if(DateField> ($(varMaxDate)-90,1) as FlagLast90,
if(DateField> ($(varMinDate )+90,1) as FlagFirst90
resident Table;
drop table Table;
and use these 2 flags to select what u need.. hope the idea is clear?*
Regards,
Omar BEN SALEM
Hello Omar,
Thanks a lot for the response, Yes this will work ,but i want this using where clause last 90 days sales for category furniture DYNAMICALLY.
Hear i am attaching the XL for your ref...
Regards..