
pivot formula sum
Ralf Becher Feb 20, 2011 5:17 PM (in response to Onur Civelek)Hi,
have you tried the AGGR function?
Would be helpful if you could upload your example...
 Ralf

pivot formula sum
Onur Civelek Feb 20, 2011 5:25 PM (in response to Ralf Becher )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
myExample.qvw 859.5 K

pivot formula sum
Ralf Becher Feb 20, 2011 6:13 PM (in response to Onur Civelek)Hi Onur,
this should do:
= 'Totalprice PLAN IST: ' & money(sum(aggr(sum( [HEL_DATA_Imps mit Defaults] ) * (SAL_OPPORTUNITYLINEITEM_UnitPrice), SAL_OPPORTUNITYLINEITEM_UnitPrice)))
 Ralf


pivot formula sum
Onur Civelek Feb 21, 2011 3:28 PM (in response to Ralf Becher )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,

pivot formula sum
Ralf Becher Feb 21, 2011 4:13 PM (in response to Onur Civelek)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





pivot formula sum
denim rhinsestone Feb 20, 2011 6:10 PM (in response to Onur Civelek)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?