# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for
Did you mean:
Not applicable

## How can i calculate growth rate?

Hi everyone,

I have time series data, saved as variable X(t), As you know it varies by time. So I want to calculate the growth rate for X(t) month by month! But it does not work in Qlikview!!

And the my time format is not compatible with Qlik time format!!

The growth rate=(X(t)-X(t-1))/X(t-1)

I would appreciate it if some one could give me some pieces of advice.

1 Solution

Accepted Solutions
MVP

Here you go:

When selection is made (Year = 92 and Month 03)

Attaching the qvw for your reference.

HTH

Best,

Sunny

25 Replies
MVP

Are you trying to do this on the front end or the script? if in the script you will need to use the Peek or Previous function and if you are trying to do in  front end, you can achieve the same by using RangeSum(Above() or Below()) function. For more help on this topic, you will have to share more information.

Best,

Sunny

Not applicable
Author

Hi,

I hope it will help u to complete the task

lo:

sl.no,name,salary

01,balu,16646

02,bif,61646

03,AK,111111

];

((salary-Previous(salary))/Previous(salary))*100 as %growth

Resident lo;

Thank you

balaji.k

MVP

can you please share the sample data because you have mentioned it includes date issue also

Not applicable
Author

Dear Sunny,

Yes, I used the rowno () (as date format dos not match the Qlik date format), above() and below() functions in front end. do the peek and previous work when I use the rowno () function?

And I wonder if you can let me know what is the difference between sum and rangesum.

best regards,

Zahra

MVP

You can find the difference between Sum() and RangeSum if you see gwassenaar‌ comments on this thread: Re: what is the range of sum function ?

MVP

Not sure I completely understand your following question:

 do the peek and previous work when I use the rowno () function?
Not applicable
Author

Dear balaji k,

Thank you very much but it works when data is sorted or there is some kind of ranking. Am I true?

In another word, can I use the rowno() function in script?

best,

Zahra

Not applicable
Author

Dear Avinash R,

Thank you, Yes of course.

as usual numbers 1-12 are the months and 93 , 92 are the years but the problem is that the months do not matches the Qlikview Date and calender.

t                         X(t)

 92/01 71565187 92/02 88710966 92/03 88138813 92/04 92719741 92/05 95968043 92/06 102555007 92/07 98895752 92/08 92763772 92/09 93568153 92/10 94379721 92/11 105969263 92/12 125155154 93/01 93854421
MVP

Is this what you are trying to get?

Script:

Table:

*;

Time,  Value

92/01, 71565187

92/02, 88710966

92/03, 88138813

92/04, 92719741

92/05, 95968043

92/06, 102555007

92/07, 98895752

92/08, 92763772

92/09, 93568153

92/10, 94379721

92/11, 105969263

92/12, 125155154

93/01, 93854421

];

Created a straight table with Time as dimension and three expressions:

1) =Sum(Value)

2) =Above(Sum(Value))

3) =Sum(Value)/Above(Sum(Value))-1

HTH

Best,

Sunny

Community Browser