Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

is there an alternative to nested if statements?

I have an IF statement that populates a variable with another variable depending on the filters selected. There are 133 possible combinations in this nested IF statement and apparently Qlikview limits you to less than that. I am looking for an alternate way to load this. I have seen suggestions for using a mapping load but I am unsure how to apply this in this instance because of the many different combinations of conditions I need. Please see below for a section of the script:


How can I rewrite these options so they will all work? it is my understanding that Qlikview does not support Switch Case statements either...

2 Replies
Not applicable

Re: is there an alternative to nested if statements?

You can replace the nested IF statements with mapping tables in some requirements,

Please post some sample data & your requirements.

Not applicable

Re: Re: is there an alternative to nested if statements?

Attached is the code I need to replace. I am setting a variable vTarget based on a combination of filters chosen in the dashboard. There are 133 conditions available but only 99 allowed in a nested if so I need an alternative way to do this.

Community Browser