
Sum of Row Values in Pivot Table
Neetu Singh Mar 19, 2012 7:04 AM (in response to Dayna Litherland)Can you elaborate your question??
As per my understanding you want the percentage of a product from total.
So, your calculation should be:
sum(amount received) / sum(total amount received).
Regards
Neetu SIngh

Re: Sum of Row Values in Pivot Table
Celambarasan Adhimulam Mar 19, 2012 7:09 AM (in response to Dayna Litherland)Hi,
Use group in the TOTAL
Sum(Sales)/Sum(TOTAL <SubProducts> Sales)

Re: Sum of Row Values in Pivot Table
Dayna Litherland Mar 19, 2012 7:13 AM (in response to Celambarasan Adhimulam )Neetu, by using TOTAL  I get the total for all products, but what I need is the sub total for each product for the subproducts, so unfortunately that doesn't work.
I tried using the group in the total, and I get the below  should the expression for Part 4054X be 3437?
Thanks,
Dayna

Example2.png 36.8 K

Re: Sum of Row Values in Pivot Table
Dayna Litherland Mar 19, 2012 7:17 AM (in response to Dayna Litherland)qlikuser14,
Thank you for your post, but I use set analysis in my calculation  so I don't think I can use AGGR  and I need it in one column.. Do you have any other suggestions?
Many thanks,
Dayna

Sum of Row Values in Pivot Table
j i Mar 19, 2012 7:20 AM (in response to Dayna Litherland)You can do it in one column, I just gave you all the formulas in different columns so you can understand it. What do you mean you use set analysis? It would be the same... If you give me an example I tell you how to do it.




Re: Sum of Row Values in Pivot Table
j i Mar 19, 2012 7:11 AM (in response to Dayna Litherland)Here you go

Test1.qvw 158.5 K


Re: Sum of Row Values in Pivot Table
Neetu Singh Mar 19, 2012 7:20 AM (in response to Dayna Litherland)Hi Dayna,
you can use this
(sum(amount received) / aggr((sum(amount received)),sub product) )

Re: Sum of Row Values in Pivot Table
Neetu Singh Mar 19, 2012 7:27 AM (in response to Dayna Litherland)Hi Dayna,
Aggr function will work with Set Analysis, as i am also using set analysis & aggr function in a single expression as mention below:
sum(aggr(sum({<Store={"=rank(sum(Sales))<3"}>} Sales),Store,Customer)).
Regards
Neetu Singh

Sum of Row Values in Pivot Table
Dayna Litherland Mar 19, 2012 7:33 AM (in response to Neetu Singh )O great, I'll give it a go! For some reason, I thought you couldn't use Set Analysis and Aggr together.. (If you can, then great!)
For the record, my calculation is:
sum
={'$(=date(addmonths(today(),1),'MMM YYYY'))'},CV_tr_type = {'ISSWO'}>} CV_tr_qty_loc)
Kind Regards,
Dayna


Sum of Row Values in Pivot Table
Neetu Singh Mar 19, 2012 7:44 AM (in response to Dayna Litherland)Can you try this, but plz check your set analysis expression as in addmonths 'mmm yyyy' it shows error:
sum({'$(=date(addmonths(today(),1),'MMM YYYY'))'},CV_tr_type = {'ISSWO'}>} CV_tr_qty_loc)
/
sum(aggr(sum({'$(=date(addmonths(today(),1),'MMM YYYY'))'},CV_tr_type = {'ISSWO'}>} CV_tr_qty_loc),SubProduct))

Re: Sum of Row Values in Pivot Table
Dayna Litherland Mar 19, 2012 10:05 AM (in response to Neetu Singh )Still no joy I'm afraid, it just comes up blank.. I'll try and get an example application sorted. For the moment, I wouldn't worry about the full expression  just the total [ sum(aggr(sum({'$(=date(addmonths(today(),1),'MMM YYYY'))'},CV_tr_type = {'ISSWO'}>} CV_tr_qty_loc),SubProduct)) ] would be wonderful.
Many thanks for your continued help!
Kind Regards,
Dayna
