Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
KKumar92
Contributor III
Contributor III

Calculating Growth Rate Using Variable

Hi,

I have defined two variables as follow;

vCYR = 1.19 & vLYR=1.84

I want to calculate the growth of the above and I used the following formula to generate the result;

($(vCYR) - $vLYR)) / $(vLYR)

The expected result in "-0.35", whereas I am getting "-0.00" as the answer.

The guidance and help on the above is highly appreciated.

Labels (3)
1 Solution

Accepted Solutions
KKumar92
Contributor III
Contributor III
Author

Hi Baradwaj,

Thanks, for the formula.

Your formula gives -100.00% as the answer. I found the correct formula for the problem;

(($(vCYR)) - ($(vLYR))) / ($(vLYR))

The above formula works, and i do get the expected answers.

Cheers,

Kishore

View solution in original post

8 Replies
saso_1970
Creator
Creator

You forget one brackets ($(vCYR) - $(vLYR)) / $(vLYR)

tresesco
MVP
MVP

Try correcting parenthesis, like:

=($(vCYR) - $(vLYR)) / $(vLYR)

KKumar92
Contributor III
Contributor III
Author

I have typed it correctly in the Qlike Sense, did a typing mistake here.

However, still I gt -0.00 as the answer.

bharadwaj
Partner - Contributor II
Partner - Contributor II

Hi ,

Try the following expression:

($(vCYR)/$(vLYR))-1 

Hope it helps

Regards

johngouws
Partner - Specialist
Partner - Specialist

Hi.

I do something similar and use: 

-1+($(vCYR)/$(vLYR))

John

 

iswarya
Partner - Creator
Partner - Creator

Hi,

Attached the app for reference.

KKumar92
Contributor III
Contributor III
Author

Hi Baradwaj,

Thanks, for the formula.

Your formula gives -100.00% as the answer. I found the correct formula for the problem;

(($(vCYR)) - ($(vLYR))) / ($(vLYR))

The above formula works, and i do get the expected answers.

Cheers,

Kishore

KKumar92
Contributor III
Contributor III
Author

Hi Jhon,

Thanks for the formula, but the same as Baradwaj's formula it gives "100.00%" as the answer.

I have given the formula that works.

Cheers