Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Search String Variable in Set Anaylsis

Hi all,

I am trying to build a seach variable to use in set anaylsis based on the selections a user makes in a field.

I have two fields which contain the same values.

Field1

Option1        

Option2

Field2

Option1

Option2

I have created a variable vSelections that takes the selections from Field1 and outputs(if both are selected)

'Option1' , 'Option2'

I want to then use this in set anaylsis

Something like sum({$<Field2 = {$(vSelections)>} Counter)

I cant seem to get it to work - so my question is- Is this right way of doing things or is there a better way? Can anyone see what I am doing wrong?

Thanks for you time

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think this should work just fine (you are missing a curly bracket, but I assume that's a typo in your post).

See attached.

You could maybe use also something like

sum({$<Field2 = p(Field1) >} Counter)

or


sum({$<Field2 = Field1 >} Counter)

View solution in original post

3 Replies
swuehl
MVP
MVP

I think this should work just fine (you are missing a curly bracket, but I assume that's a typo in your post).

See attached.

You could maybe use also something like

sum({$<Field2 = p(Field1) >} Counter)

or


sum({$<Field2 = Field1 >} Counter)

fosuzuki
Partner - Specialist III
Partner - Specialist III

I guess you missed a "}" in your formula, after the vSelections expansion:

sum({$<Field2 = {$(vSelections)}>} Counter)

Not applicable
Author

thanks for you help guys - i think the main issue is I cant seem to ever get my doller sign expansions working,

its quite hard to review what you are outputing with it