Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I want to add a percentage of sales growth from year 1 to year 2 for each category.
It should be something like this:
The formula
% increase = ((Sales year 2 - Sales year 1) ÷ Sales year 1) X 100
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%'))
I hope this helps,
Cheers,
Luis
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%'))
I hope this helps,
Cheers,
Luis
Hi Luis,
Almost there. See what I got
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?
Thanks a lot
You're welcome, you did a good job explaining and documenting the question,
Cheers,
Luis
Thanks again