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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Qlik Sense Filter Within an Expression

Hello Everyone!

So I have this expression, and I was wondering if there is a way to use a filter within that expression. For example:

this is my expression:

Count({$< StatusesId = {1}, ItemsCon -={16}>} distinct RequestId)

So what I would like to do is to provide a user with a filter so that the user can choose "ItemCon"; I would like to enable the user to either choose nothing: so the expression will be like:

Count({$< StatusesId = {1}, >} distinct RequestId)

or allow the user to specify a value for ItemCon to be excluded:

Count({$< StatusesId = {1}, ItemsCon -={16}>} distinct RequestId)

or allow the user to specify a value for ItemCon to be included:

Count({$< StatusesId = {1}, ItemsCon ={16}>} distinct RequestId)

Your help is appreciated!

Thanks!

1 Reply
sunny_talwar
MVP
MVP

Try this may be:

for excluding selection

Count({$< StatusesId = {1}, ItemsCon = e(ItemsCon)>} Distinct RequestId)

Wait, how will the expression should know when to include and when to exclude? Are you be going to use two states to do this?