10 Replies Latest reply: Jul 30, 2014 6:29 AM by Manish Kachhia

# Sum of calculated field

Dear all,

I hope someone of you can help me again

I have to following problem in a table diagram:
- I want to sum all calculated fields

Example:

Product 1     Offer 1     Balance1          Avg. Balance?

Product 2     Offer 1     Balance 2         Avg. Balance?

The Balance is a calculated field = Old Price - Offer Price
Offer Price is a Input that I can call

Old Price is again a calculated field out of different fields.

I want to sum all the Balances and divide the sum by the number of products in the same offer. In short I need the avg. balance of all products

I hope it is clear what I want to do.... THANKS FOR YOUR HELP !!!

Cheers Martin

• ###### Re: Sum of calculated field

Can you provide sample apps or sample file please?

• ###### Re: Sum of calculated field

sorry I don´t have a sample file

• ###### Re: Sum of calculated field

I created a sample file and attached it now

• ###### Re: Sum of calculated field

Dear Martin,

Didn't understood properly from you question...

• ###### Re: Sum of calculated field

please take a look at the column overinvoice... there I have 1000 and -500... now I want to calculate the avg. overinvoice

so it should be +1000-500 = +500 and then divide it by number of lines... in this case by 2

so in the end it should come as a result +250 per line and this figure it should show for every line...

sorry if it is still not clear enough... but thanks for your help!

• ###### Re: Sum of calculated field

create one more expression and write below

column(1)+column(2)+column(3)+column(4)+column(5)

• ###### Re: Sum of calculated field

I don´t want to sum the columns, I want to sum the column Overinvoice for all lines

• ###### Re: Sum of calculated field

=((SUM(ALL Invoice_price)-(SUM(ALL [Selling Price]*[FX Rate])))/[FX Rate])/NoOfRows()

• ###### Re: Sum of calculated field

The problem is that the Selling Price contains of a lot of different positions (it is also calculated), so it is not like the invoice price that I can simply call.

• ###### Re: Sum of calculated field

Instead of Selling Price, use your formula there.. otherwise supply us the dummy database according to your need.