Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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:

Untitled.png

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
Author

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

Please post some sample data & your requirements.

Not applicable
Author

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.