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

Generate calendar dates for a different field.

Hi All ,

I have one field in a QVD ,

And i want to generate a calendar for each value in different field

Example : Suppose i have one field in QDV as Region and region has 2 values A and B

Now i want ot create all dates for A and B for 2 years.

and its should other table as REGION and DATE with two column.

How can i do this

1 Reply
swuehl
MVP
MVP

Maybe like

Let vStartDate = num(Today()); // or whatever defines the start of the two year period

NewTable:

LOAD DISTINCT Region as REGION

FROM YourQVD.qvd (qvd);

JOIN (NewTable)

LOAD Date( $(vStartDate) +Recno()-1) as DATE

Autogenerate Addyears($(vStartDate),2) - $(vStartDate) ;