5 Replies Latest reply: Dec 23, 2015 4:12 PM by Sunny Talwar

How to calculate % by column in pivot table (differet years)

Hi, I have the file attached here and I'd like to calculate the % by year to each column.

Could any of you help me creating this expression?

• Re: How to calculate % by column in pivot table (differet years)

Try this expression:

Sum(Price)/Sum(TOTAL <Year> Price)

• Re: How to calculate % by column in pivot table (differet years)

Thank you!

but now I have a new situtation:

I want to sum only Pants and Shoes and I see that the % by year now is not corret:

Sum(If(Product<>'Shoes',(Price))))
/
((
If(Product<>'Shoes',Sum(Total<Year>(Price)))))

• Re: How to calculate % by column in pivot table (differet years)

Try this and see if it helps:

Sum({<Product -= {'Shoes'}>}Price) / Sum(TOTAL {<Product -= {'Shoes'}>}Price) //Note the negative sign in red

• Re: How to calculate % by column in pivot table (differet years)

Yes! thanks a lot! you saved my day

• Re: How to calculate % by column in pivot table (differet years)

Great

I am glad I was able to help

Best,

Sunny