Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
chriys1337
Creator III
Creator III

using calendar weeks and reduce the week by +/- 1

Hi all,

I am taking data from an Excel, where the date is shown like 201709 (YEAR,WEEK).

Now I am using a variable to put the date input inside and use the makeweedate() to create a proper date for QlikView  (which creates the start date of the corresponding week, e.g. 2/27/2017) and with weekname() I am going "back" to the originally shown presentation, the calendarweek: 2017/09

=weekname(makeweekdate((left(vL.ActualCalendarWeek,4)), (right(vL.ActualCalendarWeek,2))))

With this 2017/09, I usually would like to go back to week 8 etc., I thought its possible by deducting -1. BUT than QV shows 42792, that's 2/2672017. So one day instead of one week deducted.

Anyway is there a easy way to jump to different weeks from this point? I don't want to deduct always -7,-14,-21 days :/.

Thanks for any support.

1 Reply
marcus_sommer

I think it would be easier if you used a Week field or an autonumber(Year & '|' & Week) field for it which are created within the script in a master-calendar which is connected to your makeweekdate() which is really a date in whatever formatting is used for it.

- Marcus