Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
rami_naassaoui
Contributor II
Contributor II

How to exlude a certain value when applying a filter (with string values) as an action under a button ?

rami_naassaoui_0-1767101369541.png

 

1 Solution

Accepted Solutions
rami_naassaoui
Contributor II
Contributor II
Author

Hello @Or 

thank you for your prompt response.
I don't know which commands are you referring to exactly among these below. 

rami_naassaoui_0-1767130443864.png

 



However, 
One workaround I found, that finally worked, is to add an observation to the fact table with empty values except for the flag wich has 'Yes' using autogenerate(1).
This way the filter has something to step on and display empty tables and chart 
Cheers !

View solution in original post

4 Replies
Or
MVP
MVP

You'd presumably want to use the minus - operator, e.g. -'15474'. Have a look at https://webapps.qlik.com/search-cheat-sheet/Qlik+Sense+Search+Cheat+Sheet+en-US.pdf for general search patterns, it's quite helpful. 

Also note that you can use one action to select the exclusion value and then a second action for "Select excluded". 

rami_naassaoui
Contributor II
Contributor II
Author

Hello @Or ,

I have a flag field FLAG_EXTERNAL in my fact table that currently contains only the value "No" for all observations (no "Yes" values exist in the data).

Goal: I want to create a button that, when clicked:

  1. Selects all values EXCEPT "No" (essentially selecting "Yes" or any non-existent value)
  2. Results in zero observations being selected
  3. Displays all KPIs as zero/null and shows empty tables
  4. Keeps the filter pane visible showing the exclusion of "No"

Important constraint: I cannot modify existing objects (charts, KPIs, tables) - the solution must work through button actions and selections only.

What I've tried:

Attempt 1: Single action with non-existent value

  • Action: Select values matching search criteria
  • Field: FLAG_EXTERNAL
  • Value: Yes
  • Result: Nothing happens, no filter is applied, no selection is made

Attempt 2: Two actions - Select then Exclude

  • Action 1: Select values matching search criteria with value No
  • Action 2: Select excluded on FLAG_EXTERNAL
  • Result: The filter appears briefly then immediately disappears

Attempt 3: Added "Lock field after selection"

  • Checked the "Lock field after selection" option in Actions panel
  • Result: Same issue - filter still disappears

Question: How can I create a button action that successfully selects non-existent values (or excludes "No") and maintains the filter selection showing zero observations?

Are there alternative approaches I should consider? I'm using Qlik Sense

Thank you !

Or
MVP
MVP

Trying to select nulls (values that don't exist) is a whole different issue... regardless of whether you do it via button or not, the steps are generally:

1) Select all on the field where you're searching for nulls (missing values)

2) Lock all other selected fields (except, if relevant, the one in 3) below)

3) On a different field that contains a relevant key, Select Alternatives or Select Excluded as appropriate. This might be something like "Order number", "Invoice number", etc. - whatever key field you an use for the entity you're trying to look up. 

4) Unlock the previously-locked fields if desired (recommended)

A shortcut that works, but is not particularly user-friendly, is to search the field in 3) above and then use e.g. isnull(FLAG_EXTERNAL). I can't remember off-hand how you'd apply this via button but GPT can probably tell you. 

You can't directly select null() in Qlik, but another option if the steps above aren't what you want to do is to simply replace the null values in your script with something else, e.g. Coalesce(YourField,'Null') as YourField

 

rami_naassaoui
Contributor II
Contributor II
Author

Hello @Or 

thank you for your prompt response.
I don't know which commands are you referring to exactly among these below. 

rami_naassaoui_0-1767130443864.png

 



However, 
One workaround I found, that finally worked, is to add an observation to the fact table with empty values except for the flag wich has 'Yes' using autogenerate(1).
This way the filter has something to step on and display empty tables and chart 
Cheers !