Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
twanqlik
Creator
Creator

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
sunny_talwar

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

twanqlik
Creator
Creator
Author

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

sunny_talwar

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

petter
Partner - Champion III
Partner - Champion III

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)