Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

May be this

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

View solution in original post

5 Replies
Highlighted

May be this

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

View solution in original post

Highlighted
Creator
Creator

This worked instantly! Thanks a ton!

Highlighted

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

Best,

Sunny

Highlighted

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

Highlighted
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