Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I trigger 'Select Excluded' on multiple field ?

How can I trigger 'Select Excluded' on multiple field ?

I can do it on one field at a time but I can't do it on multiple field together.

Is it possible ? or should I use a SetAnalysis in expression ?

Thanks for help.

Regards.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If you are using GetFieldSelections(), the returned value is not an appropriate search string when you are selecting multiple regions. Check the value in a text box to see what I mean.

You can use something like this as search string for a select in field action (without the need for an additional select excluded):

='("'&concat({1-$} DISTINCT City ,'"|"') &'")'

or a bit more complex but easier to write:

='=sum({<[City] = p({1-$} [City] ) >} 1)'

See also attached sample app.

View solution in original post

6 Replies
swuehl
MVP
MVP

I believe you can't do that with the standard action.

And if you add several actions of that type, the excluded values will change after each action is applied.

I assume you want to select the excluded values as seen before triggering the actions, right?

If you describe what you want to achieve in more detail, we can maybe help you find a different solution (maybe with set analysis, maybe something completely different).

oknotsen
Master III
Master III

Could you please describe the situation you are trying to solve? There might be a different solution.

With the limited information I have now, I would assume a nice Set Analysis statement.

May you live in interesting times!
Not applicable
Author

Hello,

I have a country divided in Region, Province and City.

When I select Region, Province and City on the left part I would like to compare to the rest of the country on the right part.

See annexed image.

InverseSelection.PNG

I try to get the rest of the country on the right part using an alternate state via triggers like below :

InverseSelection2.PNG

I do the same things for 'OnSelect' and 'OnChange', but this is working only for the first region that I select ???

InverseSelection3.PNG

So if I select one Region or one Province on the left part , I received the rest of the Country for the alternate state on the right part,

But it doesn't work when I select more than one Region or Province ???

It's like the 'Select Excluded' works only for a single value ???

As I am beginner with Qlik I don't know if it is normal or if I miss something ???

Regards.

swuehl
MVP
MVP

If you are using GetFieldSelections(), the returned value is not an appropriate search string when you are selecting multiple regions. Check the value in a text box to see what I mean.

You can use something like this as search string for a select in field action (without the need for an additional select excluded):

='("'&concat({1-$} DISTINCT City ,'"|"') &'")'

or a bit more complex but easier to write:

='=sum({<[City] = p({1-$} [City] ) >} 1)'

See also attached sample app.

Not applicable
Author

Thanks a lot swuehl.

It's running very well.

swuehl
MVP
MVP

You're welcome.

As a side note for future postings, it's common practice here in the forum to mark the original answer as correct or helpful, not yours.