Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem in calenders

hi,

I want to make a calender which can be accessed by any table without making a circular loop,

for ex: I have two Tables Invoice, Booking and i want the date to be accessed by calender, but the problem is both my tables have link with each other.

PLease Suggest me

5 Replies
deepakk
Partner - Specialist III
Partner - Specialist III

Hi Pranav,

TempCalendar:











Set

Soft_Date=Num('01/01/2006')

;

Set

Curr_Date=Today()

;

LOAD

$(Soft_Date)

+IterNo()-1 AS Num

,

Date

($(Soft_Date)+IterNo()-1) AS

Date

AUTOGENERATE

1 WHILE $(Soft_Date)+IterNo()-1 <= $(Curr_Date)

;

TempCalendar1:

Load

Date

,

Year

(Date) As Year

,

Month

(Date) As Month

,

Day

(Date) As

Day

Resident

TempCalendar;

Drop

Second Method:

If both the tables have the same primary key You can avoid the Circular Loop by Creating resident of first transaction table which will contain the primary key and the year,month,day field and concatenate with the second transaction table which will have the primary key of that table and Year,month and day.

And Link this new table with the Primary Keys. I hope this helps you out.

table TempCalendar ;



Deepak



deepakk
Partner - Specialist III
Partner - Specialist III

I have attach the code for Temp Calendar in the attachment

Not applicable
Author

Thanks Deepak for your Reply,
Not applicable
Author

I am having one more Question, if I have more Than 10 tables to access the Calender then....................

Please Suggest me..

Regards

Pranav

deepakk
Partner - Specialist III
Partner - Specialist III

Youu can link ten tables to the Calendar Table with Date Field but this will differe upon the situation.