Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
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
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
MVP
MVP

pivot formula sum

Hi,

have you tried the AGGR function?

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

- 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
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

Yes Thank you very much.

Thats it Geeked

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
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