Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello dears
i want create Dimension of Available ِData
i want Create New Dimension That Have 2 Record ,Item1 and Item 2
Item 1 Filter Data Between 01/01/2014 to 06/01/2014
And Item 2 Filter Data Between 07/01/2014 to 07/05/2014
plz help me
Best way is to create that field in the script:
LET Start = num(makedate(2014,1,1));
LET End = num(makedate(2014,5,30));
LET NumOfDays = End - Start + 1;
k_tmp:
load
$(Start) + Rowno()-1 as dateTMP
AutoGenerate $(NumOfDays);
k:
LOAD *,
if(Activation_date >= makedate(2014,1,1) and Activation_date <= makedate(2014,1,6), 'Item1',
if(Activation_date >= makedate(2014,1,7) and Activation_date <= makedate(2014,5,7), 'Item2')) as Item;
load
Date(dateTMP) as Activation_date,
Year(dateTMP) as Year,
Month(dateTMP) as Month,
Day(dateTMP) as Day,
WeekDay(dateTMP) as WeekName,
Week(dateTMP) as Week,
Month (dateTMP) &'-'&Year (dateTMP) as MMYYYY
Resident k_tmp;
DROP Table k_tmp;
If you don't like that then you can try an expression for the listbox:
=if(Activation_date >= makedate(2014,1,1) and Activation_date <= makedate(2014,1,6), 'Item1',
if(Activation_date >= makedate(2014,1,7) and Activation_date <= makedate(2014,5,7), 'Item2'))
Best way is to create that field in the script:
LET Start = num(makedate(2014,1,1));
LET End = num(makedate(2014,5,30));
LET NumOfDays = End - Start + 1;
k_tmp:
load
$(Start) + Rowno()-1 as dateTMP
AutoGenerate $(NumOfDays);
k:
LOAD *,
if(Activation_date >= makedate(2014,1,1) and Activation_date <= makedate(2014,1,6), 'Item1',
if(Activation_date >= makedate(2014,1,7) and Activation_date <= makedate(2014,5,7), 'Item2')) as Item;
load
Date(dateTMP) as Activation_date,
Year(dateTMP) as Year,
Month(dateTMP) as Month,
Day(dateTMP) as Day,
WeekDay(dateTMP) as WeekName,
Week(dateTMP) as Week,
Month (dateTMP) &'-'&Year (dateTMP) as MMYYYY
Resident k_tmp;
DROP Table k_tmp;
If you don't like that then you can try an expression for the listbox:
=if(Activation_date >= makedate(2014,1,1) and Activation_date <= makedate(2014,1,6), 'Item1',
if(Activation_date >= makedate(2014,1,7) and Activation_date <= makedate(2014,5,7), 'Item2'))
Thanks This is Correct
Do you Can Implement Without change edit Script ,
Implement In ListBox Expression ,I am not allowed change edit script
Hi,
Create List box with expression and write if statement as suggested by Gysbert.
Regards