Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

How to roll week period to one day

 

Hi All,

I have two fields like WeekNumber and Date.

Annotation.png

Here if I select week number 1 result is like above that means a week to start with Monday.

Now I have a requirement like, if I select weekNumber 1 the week should be starts with 02-01-2018 to 08-01-2018 like that. please give any suggestions. 

Thanks,

Gopi

 

1 Solution

Accepted Solutions
Highlighted

Did you try playing around with this?

image.png

View solution in original post

5 Replies
Highlighted

Highlighted
Creator II
Creator II

 

Thank you sunny,

your link is said to change the week starts name. But here my requirement is rolling one day, that means in the first-week result is between 1st Jan to 7th Jan, but I have to move that period like 2nd Jan to 8th Jan.

I used Week(Date+1) as WeekNumber.

above function works for me ...can you tell me any other way to do that.

Thanks in advance 

Highlighted

Did you try playing around with this?

image.png

View solution in original post

Highlighted
Creator III
Creator III

As seen on the Qlik help page for the week() function, the second parameter can be used to change the day you want weeks to start on. So in your case (assuming you want your weeks to start on Tuesday):

Week(Date, 1) as WeekNumber

Highlighted
Creator II
Creator II

 

Yeah, sunny 

i tried this with some changes, WeekStart( Date-1, 0, $(vCal_FD) ) as WeekStart,

it works, 

thank you sunny.