Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Variable to hold multiple values

Hi,

I want a variable to store multiple product values so that I don't have to manually enter all the products like

Sum({<Product={'A','B,'11','121','DD','E'}>}TotalDue)

Instead I want to define a variable to hold different categories of products.

For instance, vProductCategory1 to match only Product "A", "B", and "121" so that I can use

Sum({<Product={vProductCategory1'}>}TotalDue).


So, how do I enter multiple values on a variable? Does below look right? Separate values by a semicolon inside single quotes?

Thanks.

1 Solution

Accepted Solutions
Not applicable
Author

Please find attached the solution.

View solution in original post

3 Replies
Not applicable
Author

Please find attached the solution.

Not applicable
Author

What you do is almost correct.

To define the variable as

'A','B','121'

To get the calculation using expression

Sum({<Product={ $(vProductCategory1) }>}TotalDue)

maheshkuttappa
Creator II
Creator II

It will be common separated values

vProductCategory1


Definition= 'A','B,'121'  or  A,B,121


your Expression will be


Sum({<Product={$(=vProductCategory1)}>}TotalDue).