Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jrbrutto
Contributor II
Contributor II

Deviation from a previous line

Hi there's anyone knows how to achieve this in Qlik Sense?

clipboard_image_0.png

Column % is bases on the previous value so calculation for the 6/10 should be 

((229910-241756)/241756)*100

Thanks

1 Solution

Accepted Solutions
jrbrutto
Contributor II
Contributor II
Author

I think I found: Above function is the key

=(if(isnull(Line),0,Line)-if(isnull(Above(Line)),0,Above(Line))) / if(isnull(Above(Line)),0,Above(Line))

Thanks everyone anyway

View solution in original post

3 Replies
martinpohl
Partner - Master
Partner - Master

load

Date,

Value,

((Value-previous(Value))/previous(Value))*100 as "%"

from your data

Regards

jrbrutto
Contributor II
Contributor II
Author

Hi,

Could I do it at pivot table level also?

Thanks

jrbrutto
Contributor II
Contributor II
Author

I think I found: Above function is the key

=(if(isnull(Line),0,Line)-if(isnull(Above(Line)),0,Above(Line))) / if(isnull(Above(Line)),0,Above(Line))

Thanks everyone anyway