# QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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,

Tags (1)
1 Solution

Accepted Solutions
MVP

## pivot formula sum

Hi Onur,

this should do:

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

- Ralf

7 Replies
Highlighted
MVP

## pivot formula sum

Hi,

have you tried the AGGR function?

- Ralf

Not applicable

## pivot formula sum

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

## pivot formula sum

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?

MVP

## pivot formula sum

Hi Onur,

this should do:

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

- Ralf

Not applicable

## pivot formula sum

Thank you very much.

Thats it

Not applicable

## pivot formula sum

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,

MVP

## pivot formula sum

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