Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I got data like this:
Date | Product | Sales |
4/28/2018 | A | 1 |
4/29/2018 | A | 2 |
4/30/2018 | A | 3 |
5/1/2018 | A | 4 |
5/2/2018 | A | 5 |
5/3/2018 | A | 6 |
5/4/2018 | A | 7 |
5/5/2018 | A | 8 |
5/6/2018 | A | 9 |
5/7/2018 | A | 10 |
5/8/2018 | A | 11 |
5/9/2018 | A | 12 |
5/10/2018 | A | 13 |
5/11/2018 | A | 14 |
5/12/2018 | A | 15 |
5/13/2018 | A | 16 |
5/14/2018 | A | 17 |
5/15/2018 | A | 18 |
5/16/2018 | A | 19 |
5/17/2018 | A | 20 |
5/18/2018 | A | 21 |
Date will be loaded with AutoCalendar function in Qlik Sense and bear Date.autoCalendar.Week.
Now what i want is a table of calulation like this:
Week | Sales (expression -> result) | Previous-Week-Sales |
W17 | =Sum(Sales) -> 1 | ??? -> - |
W18 | =Sum(Sales) -> 35 | ??? -> 1 |
W19 | =Sum(Sales) -> 84 | ??? -> 35 |
W20 | =Sum(Sales) -> 111 | ??? -> 84 |
Can anyone help me the expression to calculate the previous-week-sales for each week like this? Thank you all of you.
SUM(Sales)
&
Above(SUM(Sales))
Thank you. Love you..