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

Create filter

Hi,

I want to create a filter in the UI.

IF(Category='A' and Age=0,Yes,

IF(Category<>'A' and Age=0,'No')

if the user selects 'Yes', I want to show all of the IDs that at least one of them match that same condition.

in the example attached, if the user selects 'Yes', the result that will be displayed:

Capture11.JPG

Appreciates any help

13 Replies
tresesco
MVP
MVP

Try something like:

=If(Aggr(Max(If(Category='A' and Age=0,1,

     IF(Category<>'A' and Age=0,'2'))),Category)=1,'Yes',

     If(Aggr(Max(If(Category='A' and Age=0,1,

IF(Category<>'A' and Age=0,'2'))),Category)=2,'No')

)

Untitled.png

Miguel_Angel_Baeyens

I have to double post because I cannot edit

shivanisali
Partner - Contributor II
Partner - Contributor II

please look into the below attached qvw.

effinty2112
Master
Master

Hi Tal Tal,

try this expression as a filter

=if(Aggr(sum(Match(Category,'A')*Match(Age,0)),ID)>=1,'Yes','No')

Picking 'Yes'  gives:

ID Category Age
1A0
1A9

Picking 'No' gives:

ID Category Age
2B0
3C0
3C7
2B8

cheers

Andrew