Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mhapanka
New Contributor III

Calculating Percentage change in a pivot table as a field

Hi Guys, I want to be able to show % change in sales from 2017 to 2018 in a pivot table that looks like this-3.PNG

So there will be a new column " growth from '17 to '18 " that will reflect the percentage change from 2017 to 2018 for australia, austria , belgium and so on. The first entry will thus be -84% for change in sales in Australia -->  (2018-2017)/2017

Can anyone tell me how the code for this should be?

1 Solution

Accepted Solutions
MVP
MVP

Re: Calculating Percentage change in a pivot table as a field

May be this

Sum(Sales)/Before(Sum({<[Fiscal Year]>}Sales)) - 1

4 Replies
MVP
MVP

Re: Calculating Percentage change in a pivot table as a field

May be this

Sum(Sales)/Before(Sum({<[Fiscal Year]>}Sales)) - 1

mhapanka
New Contributor III

Re: Calculating Percentage change in a pivot table as a field

This worked instantly! Thanks a ton!

MVP
MVP

Re: Calculating Percentage change in a pivot table as a field

Awesome, please close the thread if you got what you wanted.

Best,

Sunny

MVP
MVP

Re: Calculating Percentage change in a pivot table as a field

Don't worry about this time, but this is not how you need to close a thread by marking 'Assumed Answer' when you actually have an answer which worked for you .

Please look here to see how you should be closing a thread

Qlik Community Tip: Marking Replies as Correct or Helpful