Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

rolling 7 days back

Hello, how do i get Data from 7 days back?

So for example if i sum(Price)

I want it to show price for today, the 7th, 6th, 5th, 4th, 3th and so on..

Can i make it in a variable??

1 Solution

Accepted Solutions
fdelacal
Specialist
Specialist

create a variable

vToday= today()

sum({<Year=,Date={">=$(=date(vToday-7,'MM/DD/YY'))"}>}Price)

Trie with this.

Regards.

View solution in original post

4 Replies
fdelacal
Specialist
Specialist

create a variable

vToday= today()

sum({<Year=,Date={">=$(=date(vToday-7,'MM/DD/YY'))"}>}Price)

Trie with this.

Regards.

Not applicable
Author

that works - What is doing the rolling back? is it 'MM/DD/YY' which express that it should roll back? or how come i have to specifiy what date format it is??

fdelacal
Specialist
Specialist

No i put 'MM/DD/YY' as example.. you can change to your format.

yo say 7 day from today in (vToday-7 and you say that it can be >=...

if today is 08/02/2013.. today -7 is 01/02/2013 then you tell that will be >=..

sorry about my english..

Hope it helps you.

Not applicable
Author

it worked - i just wanted to understand why it worked:) But i think i got the picture. Thankyou very much