Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to set weekstart and weekend

Hi,

How to set custom weekstart and weekend and get the data for lastweek and previous week.

below is the same data:

my week is starting from Friday and ends on Thursday so I will want to show sales for last week (in my example January 29th to February 04).

   

SaledateDaySales
January 29, 2016Friday100
January 30, 2016Saturday200
January 31, 2016Sunday300
February 01, 2016Monday400
February 02, 2016Tuesday50
February 03, 2016Wednesday600
February 04, 2016Thursday700
February 05, 2016Friday800
February 06, 2016Saturday900
1 Reply
jonas_rezende
Specialist
Specialist

Hi, pvnkumar907.

How timestamp use the calendar of the machine (Operational System). The my suggestion will be create one calendar with functions  WeekStart() and WeekEnd() reducing three days. See example:

script.png

Result.png

P.S.: Adapt logic to your data model and idea.

Hope this helps!