Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in expression:If takes 2-3 parameters

Good morning,

I'm trying to make a sentence LOAD...FROM...WHERE conditional, the script should load some rows according to an if condition. I think I wrote the condition correctly nevertheless It gives me the error message "Error in expression:If takes 2-3 parameters". Could anybody tell me the reason?.

 

FROM

\\Qlikview\Pruebas\PROY_PRODUCCIONES\HISPRODUCCIONES.QVD (qvd)WHERE FECRSA<(TODAY()-366) AND
IF(num(MONTH(Today())>10,
FECHA>=MONTHSTART(Today()-366) AND FECHA<=monthend('01/'&TEXT(NUM(month(today()))-10)&'/'&Year(today())),
FECHA>=MONTHSTART(Today()-366) AND FECHA<=monthend('01/'&TEXT(NUM(month(today()))+2)&'/'&Year(today()-366))));

Thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Your condition

num(MONTH(Today())>10

lacks a closing bracket.

I don't know what you want to do with your then / else branches, but I assume there are probably additional if() statements missing.

View solution in original post

2 Replies
swuehl
MVP
MVP

Your condition

num(MONTH(Today())>10

lacks a closing bracket.

I don't know what you want to do with your then / else branches, but I assume there are probably additional if() statements missing.

Not applicable
Author

I've revised the 'then' and 'else' sentences for hours and I did not revise condition.

Thank you very much.