Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

let and if statement

Hi, I have a 'status' variable which I derived and I want to include the status 'no job' in. And this status 'no job' is for when a variable 'time' is 0.0000. I've tried 'LET vNOJOB = 0.0000;' under a main tab in edit script and ' if((Time) = $(vNOJOB),'NO JOB' ' under another tab in edit script. However there's an error message saying ' if((Time) = $(vNOJOB),'NO JOB' ' statement takes 2-3 parameters.

Thanks.

5 Replies
Not applicable
Author

Hi Rachel,

I guess there should be two closing parenthesis after 'On Time', and you remove 2 after 'no job'.

As the error is describing, there's syntax error for if condition.

PrashantSangle

Hi,

Check there is bracket need to be complete after 'On Time'

In that If statement you are taking 4 parameter.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PradeepReddy
Specialist II
Specialist II

Check the syntax of the IF clauses carefully.... I think it will be a minute mistake when using Nested-IF...

PabloOrtiz
Partner - Creator
Partner - Creator

There is a syntax error, try this expression

=if(hora = $(vNOJOB),'NO JOB')

or

=if(hora = $(vNOJOB),'NO JOB','')

Not applicable
Author

Hi Rachel, on which place, you are using this condition ? it on LOAD or ?