Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Wildcard for more tha one value

Hi,

I have this wildcard into a set analisys sentence:

sum({$<Par={'*$(=All_about)*'}>}MLoc)

It works perfectly when I choose one value for the field 'All About' but I would like to choose several values, and make that the set analisys sentence works as if it has an 'OR' condition considering all the selected values.

How could I write this sentence to get this result?

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

9 Replies
swuehl
MVP
MVP

Maybe something like

sum({$<Par={ $(=concat(distinct chr(39)&'*'&All_about&'*'&chr(39),',') }>}MLoc)

Not applicable
Author

Sorry but it does not give me any value.

In fact qview thinks it is a variable from the '$' to the end of the expression because the font is grey from there.

Maybe it is a syntax errro but I do not know how to mend it.

Thanks.

Nicole-Smith

swuehl is just missing an ending parenthesis.  It should be:

sum({$<Par={ $(=concat(distinct chr(39)&'*'&All_about&'*'&chr(39),',')) }>}MLoc)

Not applicable
Author

Thanks but it does not work, maybe I did not explain myself enough,

The list box 'All_about' has members of 3 characters except for one.

allabou.png

When I filter the field 'Par' by the set analysis expression 'sum({$<Par={'*$(=All_about)*'}>}MLoc)' it works OK only if I choose only one value ('ASI' for example) in the 'All_about' list box.

But if I choose two or more values in the list, like in the attached image, there is no filtering at all so it is not what I need.

If I choose two values like in the image, I would need that the pivot table (which has the expression) sum the values of 'Par' for 'ASI' and the values of 'Par' for 'DCP' and no other value. The same if I choose three or more values.

Thank you


Anonymous
Not applicable
Author

Maybe this:

sum({$<Par={"$(=chr(39)&'*' & concat(distinct All_about, '*'&chr(39)&','&chr(39)&'*') & '*'& chr(39))"}>}MLoc)

Edit: forgot chr(39) - fixed now

Anonymous
Not applicable
Author

In fact, my concat part returns the same as from Nicole and Stefan.  The difference is that there should be quotes around the $(=<expression>):

sum({<Par ={"$(=<expression>)"}>} MLoc)

Not applicable
Author

Hi ,

I was not able to make it work so I have attached file with an example.

I show two selections in the image but I need to solve any number of selected items.

Thanks

Multiple Selection.png

tresesco
MVP
MVP

PFA

Not applicable
Author

Perfect, thank you very much.