Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

sibrulotte
Contributor 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
Employee
Employee

Re: If a sum with a set analysis does not equal zero

you should "aggr"

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

1 Reply
Employee
Employee

Re: If a sum with a set analysis does not equal zero

you should "aggr"

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

Community Browser