Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to find percent change between two years


Hello sir, i am new to qlik view,

  I have 4 years sales data(2008,2009,2010,2011). i need to find out %change of sales from 2009, 2010,2011. Assume that i have fields "paymentYear", "salesAmount". i need 3 columns or rows containing year, salesamount, %change from YearToYear.

Please help me.

1 Solution

Accepted Solutions
SunilChauhan
Champion
Champion

see the attached file

ex: for year 2009

% change= (2009 sales- 2008 sales/2008 sales)*100

Sunil Chauhan

View solution in original post

5 Replies
Not applicable
Author

Hi,

You can use below expression for all the three columns.

CY = SUM({$<paymentYear={"$(=Max(paymentYear))"}>} salesAmount)

PY = SUM({$<paymentYear={"$(=Max(paymentYear)-1)"}>} salesAmount)

%Change = (CY-PY)/PY

CY=Current Year, PY=Previous Year

Hope this helps.

Please revert back for any further query.

Cheers,

Dhananjay (DJ)

SunilChauhan
Champion
Champion

see the attached file

ex: for year 2009

% change= (2009 sales- 2008 sales/2008 sales)*100

Sunil Chauhan
Not applicable
Author

Thank you sir it is working Fine.............

But,

I want to Use in single row. How can I apply this  formula" =((column(1)-above(column(1)))/above(column(1)))" Because i am using pivot table. when i chaged to row-wise. it is not calculating.

its_anandrjs

Hi balaprasad,

Load data some thing like below

xxx:

Load * inline [

year,sales

2008,10

2009,20

2010,30

2011,40

];

Data:

load

*,

(sales-Previous(sales))/Previous(sales) as Value

resident xxx;

Drop table xxx;

And use Year as expression Value and Sales as expressions

See the attached sample file and Solutions sheet.

HTH

Rgds

Anand

Not applicable
Author

I need OutPut Like

                  2008 %change 2009 %change 2010 %change

sales          30000    ---       40000   15%    50000 12%

Regards

Bala prasad