Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
fvelascog72
Partner - Specialist
Partner - Specialist

Calendar Question

Hi all,

I have a question here.

I make a master calendar which works fine.

But I need to change some days from a week to other week.

In this year Q1 ends in week 14 with 30 and 31, but I have to change this two days to week 13.

Is it posible?

The actual solution is a excel this dates, but I want to do it in script.

Thanks.

2 Replies
Anonymous
Not applicable

In preceding load you can use if

load  *,

if  (Qtr=Q1 and month = ...and date=....... ,13,Week as week

its just a example .

Thanks

BKC

fvelascog72
Partner - Specialist
Partner - Specialist
Author

Hi Again,

I had try this:

Calendar:

LOAD

  Date,

  Week,

  WWeek,

  Month,

  Quarter,

  Year,

  Day,

  YearMonth,

  Period_id

Resident CalendarTMP

Where Week(QuarterEnd(Date)) > Week;

Concatenate

LOAD

  Date,

  Week-1 as "Week",

  WWeek,

  Month,

  Quarter,

  Year,

  Day,

  YearMonth,

  Period_id

Resident CalendarTMP

Where Week(QuarterEnd(Date)) = Week;

DROP Table CalendarTMP;

Where CalendarTMP comes from Master Calendar.

What dou you think?