Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If (Date< 27/09/2012 ....

Hey!

I don't know how to use dates in an IF... Can you please help me? I want to plot this expression:

count(if(Testserie=1 and if(DatumTag < 27/09/2012 , (L_Z1V1+L_Z1V2)/2<GW_MWZylS_OG_OLD, (L_Z1V1+L_Z1V2)/2<GW_MWZylS_OG_NEW),L_Z1V1))

I copy the part of my skript where I declare the date:


SET TimeFormat='hh:mm:ss';
SET DateFormat='YYYY.MM.DD';
SET TimestampFormat='YYYY.MM.DD hh:mm:ss[.fff]';
SET MonthNames='Jan;Feb;Mrz;Apr;Mai;Jun;Jul;Aug;Sep;Okt;Nov;Dez';
SET DayNames='Mo;Di;Mi;Do;Fr;Sa;So';


IProzer:
LOAD Datum,
  Year (Datum) as Jahr,
  Month (Datum) as Monat,
  Day (Datum) as Tag,
  Hour (Datum) as Stunde,
  Minute (Datum) as Minute,
  Date(floor(Datum),'DD/MM/YYYY') as DatumTag,

.....

Thank you for your help!!!!

Eduardo

1 Solution

Accepted Solutions
Gysbert_Wassenaar

try adding a date# around the date 27/09/2012 to make a date from the string:

count(if(Testserie=1 and if(DatumTag < date#('27/09/2012','DD/MM/YYYY') , (L_Z1V1+L_Z1V2)/2<GW_MWZylS_OG_OLD, (L_Z1V1+L_Z1V2)/2<GW_MWZylS_OG_NEW),L_Z1V1))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

try adding a date# around the date 27/09/2012 to make a date from the string:

count(if(Testserie=1 and if(DatumTag < date#('27/09/2012','DD/MM/YYYY') , (L_Z1V1+L_Z1V2)/2<GW_MWZylS_OG_OLD, (L_Z1V1+L_Z1V2)/2<GW_MWZylS_OG_NEW),L_Z1V1))


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you very much!!!!

Eduardo