Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
mrichman
Creator II
Creator II

How to let a Set Analysis and AGGR combi ignore a filter?

Hi Community, 

I have the following expression and I would like to ignore year when filter is on, however I'm not getting any or incorrect data. 

 

Currently:

=num(Sum({<Role = {'RoleA'}>}Aggr([Hours_RoleA],Field1,Field2,Field3,Field4)),'#.##0') 

 

What I thought would work but didnt. 

=num(Sum({<Role = {'RoleA'},Year=>}Aggr([Hours_RoleA],Field1,Field2,Field3,Field4)),'#.##0') 

Do you guys have any idea?

 

Thanks in advance. 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

You need to include the ignoring of year-selections within the aggr too, maybe with:

=num(Sum({<Role = {'RoleA'},Year=>}Aggr(only({< Year= >} [Hours_RoleA]),Field1,Field2,Field3,Field4)),'#.##0')

- Marcus

View solution in original post

3 Replies
marcus_sommer

You need to include the ignoring of year-selections within the aggr too, maybe with:

=num(Sum({<Role = {'RoleA'},Year=>}Aggr(only({< Year= >} [Hours_RoleA]),Field1,Field2,Field3,Field4)),'#.##0')

- Marcus

mrichman
Creator II
Creator II
Author

It worked!! Thanks.

Another question, how would you apply this to a if statement:

What I have, but not working. Thanks in advance!

if(Type='1',Count({<Year=>} Distinct Hours_RoleA),Count(Hours_RoleA))
marcus_sommer

You might need to add the set analysis condition also to your second count but you couldn't just replace the if-part because your count-expressions are different (the distinct statement).

- Marcus