Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

pivot formula sum

Hi Qlikview community,

unfortunately I can not make the pivot chart sum formula columns. As an alternative, I'm the sum of outside output.

How can I sum a formula column in the pivot chart, outside? See screenshot. Thank you!

Best regards,


1 Solution

Accepted Solutions
rbecher
MVP
MVP

Hi Onur,

this should do:

= 'Totalprice PLAN IST: ' & money(sum(aggr(sum( [HEL_DATA_Imps mit Defaults] ) * (SAL_OPPORTUNITYLINEITEM_UnitPrice), SAL_OPPORTUNITYLINEITEM_UnitPrice)))


- Ralf

Astrato.io Head of R&D

View solution in original post

7 Replies
rbecher
MVP
MVP

Hi,

have you tried the AGGR function?

Would be helpful if you could upload your example...

- Ralf

Astrato.io Head of R&D
Not applicable
Author

Hi Ralf,

I am grateful for any help. I do not see how I could do with a AGGR function. Thank you!

Here are my qvw file.

Best regards,
Onur

Not applicable
Author

You need to enable "partial sums" on the dimension for a pivot to show total (presentation tab), usually just the last dimension will do.

Outside the pivot you need to tell it how you want to aggregate the second field as you will have more than one entry. You've told it to sum the first field and the second field looks like an item cost field so should qv sum them all up together too then multiply the two sums?

rbecher
MVP
MVP

Hi Onur,

this should do:

= 'Totalprice PLAN IST: ' & money(sum(aggr(sum( [HEL_DATA_Imps mit Defaults] ) * (SAL_OPPORTUNITYLINEITEM_UnitPrice), SAL_OPPORTUNITYLINEITEM_UnitPrice)))


- Ralf

Astrato.io Head of R&D
Not applicable
Author

Yes Thank you very much.

Thats it Geeked

Not applicable
Author

Hi Ralf,

there is an another isue with your formula --> http://community.qlik.com/forums/t/41287.aspx

Have you an any idea ? Thank you !

Best Regards,

rbecher
MVP
MVP

Hi Onur,

the problem is that Set Analysis will not work on your expression because it only works on functions like SUM. You have to rewrite your expression to avoid the multiplication outside the SUM function like this:

= 'Totalprice PLAN IST: ' & sum({1} aggr({1} sum({1} [HEL_DATA_Imps mit Defaults] * SAL_OPPORTUNITYLINEITEM_UnitPrice), SAL_OPPORTUNITYLINEITEM_UnitPrice))


This example will calculate the wrong figure in your case I guess. But, it shows how the Set Analysis would work.

- Ralf

Astrato.io Head of R&D