Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Partner
Partner

Create 1 calendar with 2 date tables

Hi,

I have a script with a fact table and a different table with amounts. De fact table is linked to the Amount table with a ProjectID.

Also linked to the fact table is a master calendar based on the date field in the fact table. Now I have a date field in the Amount table as well (DateAmount).

How can I get this linked to the master calendar as well without creating loops etc? I searched the forum but couldn't find an answer that would help me fix it.

Thanks for your help!

Regards,

Paul

Capture.PNG.png

18 Replies
Highlighted
arsal_90
Contributor III

Re: Create 1 calendar with 2 date tables

You can achieve this by link table

Highlighted
rohit214
Contributor III

Re: Create 1 calendar with 2 date tables

hi,

do,

load

ID, Date,.... from facts;

left join

ID,

Date1 as Date

from amount fact;

so both the date come in single table.

hoope it helps you.

thanks

rohit

Highlighted
Partner
Partner

Re: Create 1 calendar with 2 date tables

Hi Paul,

Please check this very useful article http://community.qlik.com/blogs/qlikviewdesignblog/2014/02/17/canonical-date

Hope it helps.

Andrei

Highlighted
Partner
Partner

Re: Create 1 calendar with 2 date tables

Capture.PNG.pngHi Rohit,

If I do that I get lots of sync keys:

Highlighted
Partner
Partner

Re: Create 1 calendar with 2 date tables

How do I create this link table with the sync keys I get below?

Highlighted
arsal_90
Contributor III

Re: Create 1 calendar with 2 date tables

Below find the link table and if you still have problem then shared me your qvw with sample data

Highlighted
Partner
Partner

Re: Create 1 calendar with 2 date tables

Hi Paul,

To aviod Syn Keys you can create a table with all common fields inside, make a key using autonumber in parent tables and afterwards delete common fields from parent tables.

Highlighted
Partner
Partner

Re: Re: Create 1 calendar with 2 date tables

Thanks for the file.

Please find my file attached, hope you can help

Regards,

Paul

Highlighted
rohit214
Contributor III

Re: Create 1 calendar with 2 date tables

hi,

can you share with me you code?

thanks

rohit