Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
vvvvvvizard
Specialist
Specialist

error on the last line only

the code runs if i comment out the last line , with the last line uncommented i get an error saying "takes 2 -3 parametres" . I think its the brackets

if( [M/E DAT REC]='?','?',
if(([V JAAR]*100)+[V MAAND]=((Year(Today())*100)+Month(Today()))-1 and  floor((today()-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)=0,'0',
if(Floor((Date(MonthEnd(MakeDate([V JAAR],[V MAAND],10)),'YYYY/MM/DD')+1-1-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)=0,'0',
if(([V JAAR]*100)+[V MAAND]=((Year(Today())*100)+Month(Today()))-1 and  floor((today()-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)<=1,'<=1',
if(Floor((Date(MonthEnd(MakeDate([V JAAR],[V MAAND],10)),'YYYY/MM/DD')+1-1-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)<=1,'<=1',
if(([V JAAR]*100)+[V MAAND]=((Year(Today())*100)+Month(Today()))-1 and  floor((today()-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)>1 and  floor((today()-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)<=3,'>1',
if(Floor((Date(MonthEnd(MakeDate([V JAAR],[V MAAND],10)),'YYYY/MM/DD')+1-1-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)>1 and  if(Floor((Date(MonthEnd(MakeDate([V JAAR],[V MAAND],10)),'YYYY/MM/DD')+1-1-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)<=3 ,'>1'))))))))

1 Solution

Accepted Solutions
sunny_talwar

Your error is here.... if that is what you are interested int

Capture.PNG

View solution in original post

3 Replies
vvvvvvizard
Specialist
Specialist
Author

So the error is in this piece of code

if(Floor((Date(MonthEnd(MakeDate([V JAAR],[V MAAND],10)),'YYYY/MM/DD')+1-1-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)>1 and  if(Floor((Date(MonthEnd(MakeDate([V JAAR],[V MAAND],10)),'YYYY/MM/DD')+1-1-date((date#( [M/E DAT REC],'DD/MM/YYYY')),'YYYY/MM/DD'))/30.417)<=3 ,'>1'))))))))

sunny_talwar

May be this

If([M/E DAT REC]='?', '?',

If(([V JAAR]*100) + [V MAAND] = ((Year(Today())*100)+Month(Today())) - 1 and Floor((Today() - Date#([M/E DAT REC], 'DD/MM/YYYY'))/30.417) = 0, '0',

If(Floor((MonthEnd(MakeDate([V JAAR],[V MAAND],10)) + 1 - 1 - Date#([M/E DAT REC], 'DD/MM/YYYY'))/30.417) = 0, '0',

If(([V JAAR]*100) + [V MAAND] = ((Year(Today())*100)+Month(Today())) - 1 and Floor((Today() - Date#([M/E DAT REC], 'DD/MM/YYYY'))/30.417) <= 1, '<=1',


If(Floor((MonthEnd(MakeDate([V JAAR],[V MAAND],10)) + 1 - 1 - Date#([M/E DAT REC], 'DD/MM/YYYY'))/30.417) <=1, '<=1',

If(([V JAAR]*100) + [V MAAND] = ((Year(Today())*100)+Month(Today())) - 1 and Floor((Today() - Date#([M/E DAT REC], 'DD/MM/YYYY'))/30.417) > 1 and Floor((Today() - Date#([M/E DAT REC], 'DD/MM/YYYY'))/30.417) <=3, '>1',

If(([V JAAR]*100) + [V MAAND] = ((Year(Today())*100)+Month(Today())) - 1 and Floor((Today() - Date#([M/E DAT REC], 'DD/MM/YYYY'))/30.417) > 1 and  If(([V JAAR]*100) + [V MAAND] = ((Year(Today())*100)+Month(Today())) - 1 and Floor((Today() - Date#([M/E DAT REC], 'DD/MM/YYYY'))/30.417) <= 3 , '>1')))))))

sunny_talwar

Your error is here.... if that is what you are interested int

Capture.PNG

View solution in original post