Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of Last 7 days

Hi All,

I have [Report Date] combobox. which ever date I select in combo box , text box should show sum of last 7 days of selected date.

Example:

Selected Date

16/01/2017

05/01/2017

151

06/01/2017

243

07/01/2017

279

08/01/2017

310

09/01/2017

378

10/01/2017

264

11/01/2017

382

12/01/2017

173

13/01/2017

275

14/01/2017

142

15/01/2017

322

16/01/2017

161

17/01/2017

395

3 Replies
MK_QSL
MVP
MVP

=SUM({<Date = {">=$(=Date(Max(Date)-7))<=$(=Date(Max(Date)))"}>}Sales)

or

=SUM({<Date = {">=$(=Date(Max(Date)-6))<=$(=Date(Max(Date)))"}>}Sales)

Change Date with [Report Date]

Not applicable
Author

Thank you Manish . It works. Would you please explain what exactly it does? and why and where we use '$' , {,"",' etc special characters. Thanks again.

MK_QSL
MVP
MVP

It's a long story to explain.

1) Go through below link. Download the document and go through it. You will learn what is set analysis in QlikView.

Set Analysis: syntaxes, examples

2) Mark answer as correct if you think you got the solution. This will help other members who are looking for similar solution and have similar issue.

Thanks,

MK