Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
miklodepiklo
Partner - Contributor III
Partner - Contributor III

Sum of sales on date and date minus one day

Hi experts,

I'm having these data:

load * inline [
Date, Amount
19-1-2024, 1
19-1-2024, 4
16-1-2024, 2
16-1-2024, 7
15-1-2024, 3
14-1-2024, 5
];

My desired table looks like this:

Date          | Sum of sales on date | Sum of sales on date minus 1
19-1-2024 |                                 5 |                                             0
16-1-2024 |                                 9 |                                             3
15-1-2024 |                                 3 |                                             5
14-1-2024 |                                 5 |                                             0

How do I get this result in Qlik Sense table expression (not load script). I have tried function above but then Qlik returns 9 instead of 0 for date 19-1-2024.

Any help much appreciated.

Labels (1)
  • SaaS

1 Reply
Clement15
Partner - Creator III
Partner - Creator III


Hello, using this formula should work

Clement15_0-1716977008840.png