Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating Variance for KPI

Hello Community,

I'm looking to make a simple variance KPI beneath the KPI numbers i've got, comparing current and last year numbers and showing the difference in %.

Current year expression:

Sum({<AAR={$(=Max(AAR))}>}ARBLED)

Last year Expression:

Sum({<AAR={$(=Max(AAR)-1)}>}ARBLED)

AAR in the expression above is a year field in my data set. 

I tried to simply divide last year with current year. However my output isn't the same numbers calculated normally at all (which could give me say 0,9, and therefore the difference would be -0,1(-10%).

I basically want to show it this way, only missing the variance:

2016-11-30 00_04_40-How to use KPI to compare this month KPI to las... _ Qlik Community – Google Chr.png

Best regards,

Mark J

1 Solution

Accepted Solutions
Not applicable
Author

Sorry - the photo is kinda misguiding, i took it from another post, from which the answers were only regarding comparing months.

I however got it done right now by using the expression:

Last Month expression / current month expression * 100-100

Not sure if it's allright to do it that way, format wise and if maybe the *100-100 could give me problems at some point?  if there's a better way to do it please say so? but it does the job at least.

View solution in original post

4 Replies
sunny_talwar

So you are saying that your numbers from the two expressions are incorrect? Because 17.96/46.62 = 38.52% or 39%, Right?

Not applicable
Author

Sorry - the photo is kinda misguiding, i took it from another post, from which the answers were only regarding comparing months.

I however got it done right now by using the expression:

Last Month expression / current month expression * 100-100

Not sure if it's allright to do it that way, format wise and if maybe the *100-100 could give me problems at some point?  if there's a better way to do it please say so? but it does the job at least.

sunny_talwar

If you are getting the right output now, I don't see why it would be a problem at a later point. You are going to be carrying out the same operation each time. So you should be good to go

Not applicable
Author

Allright, Thank you for the confirmation at least