Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
MRitter
Employee
Employee

Difference in rows in straight table

My client has provided me with a qvd that contains the mm/yy along with totals in several columns.  One column is new patients for example.   Each of the columns is the running total for 18 months for that metric.  I have none of the raw data that was used to arrive at these totals.  

I need to calculate the difference between the current row and the one prior to it for each row.

For example:

Period          Total           Difference

09/2019        4000              0

10/2019        4578             578

11/2019        4300             -278

I hope this makes sense and it is not a stupid question.  Just not getting it today.  Thanks

1 Reply
bharathadde
Creator II
Creator II

Try this

Table:

Load
Period,
Total,
Peek('Total',-1)-Total as Difference
from Table;