Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

grajesh_sgp
New Contributor II

Master Calendar with Sequence Dates

Hi,

I have created the master calendar by using start date and end date.But  the requirement is while generating master calendar I have to generate sequence of dates like 01/01/2019,03/01/2019,05/01/2019,07/01/2019,09/01/2019 etc.....instead of all dates.

 

Any suggestions please.

 

 

 

 

1 Solution

Accepted Solutions
Partner
Partner

Re: Master Calendar with Sequence Dates

Hi!

Try this:

TempCalender:
LOAD * Where Mod(TempDate, 2) = 0
;
load
Date($(vMinDate) + IterNo()-1) as TempDate
AutoGenerate 1 While $(vMinDate) + IterNo()-1 <=$(vMaxDate)
;

Bests,

Jaime.

View solution in original post

3 Replies
Partner
Partner

Re: Master Calendar with Sequence Dates

Hi!

It may depend on how you create your Master Calendar. Can you share the code of your Calendar?

A possible idea if you want to test it yourself: add a "Where" clause in your Master Calendar with something like

Where Mod(Date, 2) = 1

This condition will generate a sequence like the one you suggest.

Bests,

Jaime.

grajesh_sgp
New Contributor II

Re: Master Calendar with Sequence Dates

Here is logic I have used for calendar , If we add where condition as you suggested its throwing error.
TempCalender:
load
Date($(vMinDate) + IterNo()-1) as TempDate
AutoGenerate 1 While $(vMinDate) + IterNo()-1 <=$(vMaxDate)
;
Partner
Partner

Re: Master Calendar with Sequence Dates

Hi!

Try this:

TempCalender:
LOAD * Where Mod(TempDate, 2) = 0
;
load
Date($(vMinDate) + IterNo()-1) as TempDate
AutoGenerate 1 While $(vMinDate) + IterNo()-1 <=$(vMaxDate)
;

Bests,

Jaime.

View solution in original post