Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hi can anyone tell me how to create master calendar

i need a master calendar so that all the dates can be captured in single calendar...

i am new to qlikview need clear code for it

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find script below

Sales:

LOAD

     Date,

     Sales

FROM Sales;

//Get Minimum date

TempSales:

LOAD

    Min(Date) AS MinDate

RESIDENT Sales;

   

//Get and store Minimum date

LET vDateMin = FieldValue('MinDate', 1);

LET vTodayNum = Num(Today());

DROP TABLE TempSales;

SalesDates:

LOAD

    ($(vDateMin) + (RecNo()) - 1)  AS Date,

    RecNo() AS DateRecNo   

AUTOGENERATE ($(vTodayNum) - $(vDateMin) + 1);

Hope this helps you.

Regards,

Jagan.

View solution in original post

1 Reply
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find script below

Sales:

LOAD

     Date,

     Sales

FROM Sales;

//Get Minimum date

TempSales:

LOAD

    Min(Date) AS MinDate

RESIDENT Sales;

   

//Get and store Minimum date

LET vDateMin = FieldValue('MinDate', 1);

LET vTodayNum = Num(Today());

DROP TABLE TempSales;

SalesDates:

LOAD

    ($(vDateMin) + (RecNo()) - 1)  AS Date,

    RecNo() AS DateRecNo   

AUTOGENERATE ($(vTodayNum) - $(vDateMin) + 1);

Hope this helps you.

Regards,

Jagan.