Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
chauhans85
Esteemed Contributor

Re: How to find percent change between two years

see the attached file

ex: for year 2009

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

5 Replies
Not applicable

How to find percent change between two years

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)

chauhans85
Esteemed Contributor

Re: How to find percent change between two years

see the attached file

ex: for year 2009

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

Not applicable

How to find percent change between two years

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.

Re: How to find percent change between two years

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

How to find percent change between two years

I need OutPut Like

                  2008 %change 2009 %change 2010 %change

sales          30000    ---       40000   15%    50000 12%

Regards

Bala prasad

Community Browser