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

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

10 Replies
MK_QSL
MVP
MVP

Can you provide sample apps or sample file please?

Not applicable
Author

sorry I don´t have a sample file

Not applicable
Author

I created a sample file and attached it now

MK_QSL
MVP
MVP

Dear Martin,

Can you please elaborate more about your requirements?

Didn't understood properly from you question...

Not applicable
Author

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!

SunilChauhan
Champion
Champion

create one more expression and write below

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

Sunil Chauhan
MK_QSL
MVP
MVP

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

Not applicable
Author

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.

Not applicable
Author

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