Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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).
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.
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.
I try to get the rest of the country on the right part using an alternate state via triggers like below :
I do the same things for 'OnSelect' and 'OnChange', but this is working only for the first region that I select ???
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.
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.
Thanks a lot swuehl.
It's running very well.
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.