Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How can I add a percentage of sales growth - Pivot table.

Hi everyone,

I want to add a percentage of sales growth from year 1 to year 2 for each category.

Screen Shot 2017-12-06 at 11.44.33 PM.png

It should be something like this:

Screen Shot 2017-12-07 at 12.50.18 AM.png


The formula

% increase = ((Sales year 2 - Sales year 1) ÷ Sales year 1) X 100

1 Solution

Accepted Solutions
luismadriz
Specialist
Specialist

Hi Abbas,

Turn On Totals  for Year and change the sales measure to this:

If(Dimensionality()=1,Sum(Sales),Num((Sum({<Year={2}>}Sales)-Sum({<Year={1}>}Sales))/Sum({<Year={1}>}Sales),'0%'))

Untitled.png

I hope this helps,

Cheers,

Luis

View solution in original post

6 Replies
luismadriz
Specialist
Specialist

Hi Abbas,

Turn On Totals  for Year and change the sales measure to this:

If(Dimensionality()=1,Sum(Sales),Num((Sum({<Year={2}>}Sales)-Sum({<Year={1}>}Sales))/Sum({<Year={1}>}Sales),'0%'))

Untitled.png

I hope this helps,

Cheers,

Luis

Anonymous
Not applicable
Author

Hi Luis,

Almost there. See what I gotScreen Shot 2017-12-07 at 1.02.01 AM.png

luismadriz
Specialist
Specialist

Good, you now just need to change Sum(Sales) to Num(Sum(Sales),format)

Check this for formating: http://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/FormattingFunct...

And maybe change the label for Totals to %Growth

Anything else?

Anonymous
Not applicable
Author

Thanks a lot

luismadriz
Specialist
Specialist

You're welcome, you did a good job explaining and documenting the question,

Cheers,

Luis

Anonymous
Not applicable
Author

Thanks again