Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem on a linear table

Hi, i'm new in this community, so help me if i make mistakes, thanks.

I have a problem with a sum on a linear table, data are these :

Customer 1204613/05/2010€ 1.846,5431/10/2010INS
Customer 118125/01/2007€ 1.619,3530/04/2007INS
Customer 128331/01/2007€ 1.339,1430/04/2007INS
Customer 1204613/05/2010€ 1.846,5331/08/2010INSFATT
Customer 1204613/05/2010€ 242,2230/09/2010INS
Customer 1221420/05/2010€ 795,2231/08/2010INSFATT
Customer 1221420/05/2010€ 795,2230/09/2010INS
Customer 1221420/05/2010€ 795,2231/10/2010INS

I need to insert total for customer 1 in a linear table, but,the row with "insfatt", have not to take part in total, so, for customer 1 the total have to be 6637,69.

If i insert a formula like this in my Table (FattScaDataSca and InsScaDataSca are present in the same record, where FattScaDataSca is not null the value have not to take part in total sum)

sum(if (isnull(FattScaDataSca), if (isnull(InsScaDataSca),0,InsScaImportoSca,0))

this is the result

29211,21

what are my mistake ?

Thanks a lot

2 Replies
Not applicable
Author

Well, if you need to sum where the value is INS, you can use the next:

sum(  { $ < FILTERFIELD = { ' INS ' } > } MONEYFIELD )

Where FILTERFIELD is that contains INS and INSFATT as values in your example and MONEYFIELD is the field that contains the quantities you want to sum.

Hope it helps!

Anonymous
Not applicable
Author

Hi Paolo, Try This:

sum( { $ < TYPE = {INS} > } AMOUNT ) .     

Best Regards    

Rogelio