Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
ivandrago
Creator II
Creator II

Compare Results from Day Before

Hi,

I have the attached Document, is it possible to compare the previous days Qty for each orderId which will tell me the difference of qty's when comparing against the previous each Day

orderId      dateStamp      Qty      Diff

1             05/09/2013      12        0              

1             04/09/2013      12        -13                                  

1             03/09/2013       25       12

1             31/08/2013       7         -3

1             30/08/2013      10       10

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

=sum(Qty) - below(sum(Qty))

for your Diff expression

View solution in original post

4 Replies
swuehl
MVP
MVP

Try

=sum(Qty) - below(sum(Qty))

for your Diff expression

ivandrago
Creator II
Creator II
Author

Hi,

Sorry It is not bringing the figures that I require.

Thanks

tresesco
MVP
MVP

It (@swuehl's  solution) is working perfect, PFA

ivandrago
Creator II
Creator II
Author

Yes, sorry it is working, I didn't put all the dates on my above list so when I was doing my cross matching i was miscounting.