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

If a sum with a set analysis does not equal zero

Hi,

I tried a straight table with this sum:

sum({<%CLE_Code_Paie_Type_Dist={'834-G','834-D','340-D'}>}Montant)

Works like a charm.

Now I am trying to include this in  a dimension as follows:

if ( Sum({<%CLE_Code_Paie_Type_Dist={'834-G','834-D','340-D'}>}Montant)<>0, Compagnie

So I'm trying to show only companies that have had one of these three Pay codes.

If their sum is 0, I do not want to show them...

I get a calculation error in calculated dimension message.
What am i doing wrong?

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

you should "aggr"

aggr(if ( Sum({<%CLE_Code_Paie_Type_Dist={'834-G','834-D','340-D'}>}Montant)<>0, Compagnie ) ,Compagnie)

View solution in original post

1 Reply
Clever_Anjos
Employee
Employee

you should "aggr"

aggr(if ( Sum({<%CLE_Code_Paie_Type_Dist={'834-G','834-D','340-D'}>}Montant)<>0, Compagnie ) ,Compagnie)