Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Combining values and variables in Element List

Hi all - is it possible to have both a variable and a value in a set modifier?  For instance, if I know that two values in a field are to always be excluded, but want to have a third be dependent upon the user's selection, is it possible to have something like:

[Field A]-={'Value 1','Value 2',[Variable]}

I'm trying this right now, but my equation doesn't seem to work...

1 Solution

Accepted Solutions
Not applicable
Author

I'm sorry, I misspoke and didn't catch myself before reading your replies - I meant a field, not a variable.  I.E the value excluded depends on the user's selection.

[Field A]-={'Value 1','Value 2',[Field 2]}


EDIT: Got it - had to use a $ expansion.  Thanks for your help, everyone.

View solution in original post

3 Replies
sasiparupudi1
Master III
Master III

[Field A]-={'Value 1','Value 2','$(Variable)'}

should work

maxgro
MVP
MVP

sum({1 <[Field A]-={'UK','USA' $(Variable)}>} Sales)

Variable

=if(GetSelectedCount([Field A])>0,

  ',' & chr(39) & concat([Field A], chr(39) & ',') & chr(39)

  )

Not applicable
Author

I'm sorry, I misspoke and didn't catch myself before reading your replies - I meant a field, not a variable.  I.E the value excluded depends on the user's selection.

[Field A]-={'Value 1','Value 2',[Field 2]}


EDIT: Got it - had to use a $ expansion.  Thanks for your help, everyone.