Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

Previous 7 days data when a date is selected

Hi All,

I have to find sum of sales of previous 7 days when i select a date (including the selected date).

Any idea ?

Regards

Renjith

1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

in expression  replace 7 with 6

and copy to text

see the attched file

hope this may helps

Sunil Chauhan

View solution in original post

6 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try this

     Sum({<DateField={">=$(=Max(Floor(Num(DateField))-7)<=$(=Max(DateField))"}>} Sales)

renjithpl
Specialist
Specialist
Author

Thanks for the reply, but its not working!!

CELAMBARASAN
Partner - Champion
Partner - Champion

Sum({<DateField={">=$(=Date(Max(Floor(Num(DateField))-7))<=$(=Date(Max(DateField)))"}>} Sales)

SunilChauhan
Champion II
Champion II

see the attched file

hope this helps

Sunil Chauhan
renjithpl
Specialist
Specialist
Author

I want it in a text box, i dont know for what reason, it shows the sales only for the selected date, its not returning for 7 days sales.

SunilChauhan
Champion II
Champion II

in expression  replace 7 with 6

and copy to text

see the attched file

hope this may helps

Sunil Chauhan