Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mhapanka
Creator
Creator

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
sunny_talwar

May be this

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

View solution in original post

5 Replies
sunny_talwar

May be this

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

View solution in original post

mhapanka
Creator
Creator
Author

This worked instantly! Thanks a ton!

sunny_talwar

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

Best,

Sunny

sunny_talwar

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

Quest
Contributor
Contributor

I am using flags and other dimensions. how do i write it. 

 

sum({$<%df_IsThisDate={1}, %Process={"Sales"},[SKU Group] = {'Blocks'}>} [# Net Amount])/Before (sum({$<%df_IsThisDate={1},FiscalYear, %Process={"Sales"},[SKU Group] = {'Blocks'}>} [# Net Amount])) - 1

 

Thanks