Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
fvelascog72
Valued Contributor

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.

Tags (2)
2 Replies
balkumarchandel
Valued Contributor II

Re: Calendar Question

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
Valued Contributor

Re: Calendar Question

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?

Community Browser