Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
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
Highlighted
Not applicable

Re: let and if statement

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.

Highlighted

Re: let and if statement

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.
Highlighted
Valued Contributor II

Re: let and if statement

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

Highlighted
Partner
Partner

Re: let and if statement

There is a syntax error, try this expression

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

or

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

Highlighted
Not applicable

Re: let and if statement

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