Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

how to classify values into dynamic groups

I need to classify values of a field into four classes.

Depending on the values in a second field, the threshold for the classes are different.

For example.

if field2=A

0-10: Null

11-20: Low

21-40: Mid

41+: High

if field2=B

0-7: Null

8-17: Low

18-43: Mid

44+: High


in field2 I have at least 10 different values

How can I sort this out, without creating a (roughly) forty-times-nested if statement?


2 Replies

Re: how to classify values into dynamic groups

Crete an Inline table with Field, Value and Flag and generate in the script itself

Not applicable

Re: how to classify values into dynamic groups

thank you for your inpute. to understand better, would you create something like



0, A, Null

1, A, Null

2, A, Null


11, A, Low

12, A, Low


21, A, Mid

etcetc. ?

It requires so many lines.

This was the only solution I was able to think to (besides the nested if statements) but it is not so easy to be maintained!