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

Aggr(If) expression

Hi all,

Below is my expression for my 'Pillar' filter pane.

=Aggr(if(len(getfieldselections(%GPA1)>0) and len(getfieldselections(%GPA2)=0),Only({$<GPACONCAT = P(%GPA1)>} [Pillar]),


if(len(getfieldselections(%GPA1)>0) and len(getfieldselections(%GPA2)>0),Only({$<GPACONCAT = P(%GPA1)+P(%GPA2)>} [Pillar])))


,[Pillar])


%GPA1 and %GPA2 are my 2 filter panes. The above expression only shows available 'Pillar' selection for %GPA1 even after I select values in %GPA1 and %GPA2.

When I select  %GPA1, I want to show the 'Pillar' values available only for %GPA1. So when I select %GPA1 and %GPA2, the 'Pillar' values available should be for %GPA1 and %GPA2. How should I change my expression?



Much help is appreciated. Thank you very much.

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

In a normally structured model, the behaviour that you describe would work automatically without the need for an Aggr()  expression. Perhaps there is some element of your problem that you did not mention or that I have not fully understood.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
NewToQlik
Creator
Creator
Author

I am using set analysis as a replacement for alternate states. Hence,my %GPA1 and %GPA2 fields are not connected to the table storing the 'Pillar' field.