Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

twanqlik
New Contributor II

Listbox to exclude values

Instead of using a listbox to select values that need to be included, I want to use a listbox to exclude values.

Example with using the below table.

Selection 1: User selects 'Campaign Business Group = PC'

Selection 2: User selects 'Variable = Vita'  to exclude Vita.

End result: The user expects to see only: Campaign.ID= 1,2,4,5

Campaign.IDCampaign Business GroupVariable
1PC
2PCTest
3PCVita
4PCNutri
5PC
6PC
7HCC
8HCC
9HCC

*Any thoughts on how to do this?

Even nicer would be to have a variable that i can use to make the listbox an include or exclude list

4 Replies
Highlighted
MVP
MVP

Re: Listbox to exclude values

Is this something you need for a chart or dashboard wide?

twanqlik
New Contributor II

Re: Listbox to exclude values

Preferable dashboard wide, but when that is not possible, for a chart can also work.

MVP
MVP

Re: Listbox to exclude values

Chart should be simple... you can use e() to exclude selection in an expression using set analysis

P() & E() and where do you use them?

Dashboard wide could become difficult to maintain, but should be possible using triggers

MVP
MVP

Re: Listbox to exclude values

An expression like this could be used:

MinString({1-<Variable={$(=GetFieldSelections(Variable))}>} Variable)

If you want to do it application / dashboard wide you can make the set expression into a variable and use it in all charts that need it:

vExclude = '1-<Variable={$(=GetFieldSelections(Variable))}>'

MinString({$(vExclude} Variable)