Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

How to get last week value in set analysis??

Team,

I could get value for current week sale , but in my scenario i need to get value for last week sale so i need to use [week date] - 7 in my set analysis !

Please share your thoughts!!

1 Solution

Accepted Solutions
Highlighted
Specialist
Specialist

Hi, Ashok. Try this set analysis

{< [YourDateField] = {">=$(=WeekStart(Today() - 7))<=$(=WeekEnd(Today() - 7))"} >}

View solution in original post

3 Replies
Highlighted
Specialist
Specialist

Hi, Ashok. Try this set analysis

{< [YourDateField] = {">=$(=WeekStart(Today() - 7))<=$(=WeekEnd(Today() - 7))"} >}

View solution in original post

Highlighted
Contributor III
Contributor III

Thanks for your response Andrey! will try and get back to you!

Highlighted
Specialist
Specialist

Do you use a master calendar?

Add a week id to that with autonumber: autonumber(Year(Date)&Week(Date)) as Week_ID.

this will give a sequencial number starting from the first date (be careful with week 53, is it in the old year or the new .....)

Use this in your set analysis:

Sum({<Week_ID = {"$(=max(Week_ID)-1)"}>}whatever)