Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 1 | 2046 | 13/05/2010 | € 1.846,54 | 31/10/2010 | INS |
Customer 1 | 181 | 25/01/2007 | € 1.619,35 | 30/04/2007 | INS |
Customer 1 | 283 | 31/01/2007 | € 1.339,14 | 30/04/2007 | INS |
Customer 1 | 2046 | 13/05/2010 | € 1.846,53 | 31/08/2010 | INSFATT |
Customer 1 | 2046 | 13/05/2010 | € 242,22 | 30/09/2010 | INS |
Customer 1 | 2214 | 20/05/2010 | € 795,22 | 31/08/2010 | INSFATT |
Customer 1 | 2214 | 20/05/2010 | € 795,22 | 30/09/2010 | INS |
Customer 1 | 2214 | 20/05/2010 | € 795,22 | 31/10/2010 | INS |
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
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!
Hi Paolo, Try This:
sum( { $ < TYPE = {INS} > } AMOUNT ) .
Best Regards
Rogelio