Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

vchuprina
New Contributor II

Two calendars in one chart

Hi,

I'm trying to combine two tables with different calendars into one chart.

Tables are linked by item code and I created link table with following fields:

DateLink:

LOAD
[ItemKey]  AS ItemKey,
TransDateKey as Date
'Trans'
AS DateType
Resident Trans;

LOAD
[ItemKey]  AS ItemKey,
OperDateKey  as Date,
'Operations'
AS DateType
Resident Operations;

And the problem that I can't correctly load data.

When I load Item and TransDateKey from Trans table I have 120 items for 2017-04-06

But when I load data with DataLink table I chose DateType Trans and get another results, for some reason I get 2481 item.

At the moment I cant understand what is wrong.

6 Replies

Re: Two calendars in one chart

Try with Join Condition for two tables.

LOAD
[ItemKey]  AS ItemKey,
TransDateKey as Date
'Trans'
AS DateType
Resident Trans;

Join

LOAD
[ItemKey]  AS ItemKey,
OperDateKey  as Date,
'Operations'
AS DateType
Resident Operations;

vchuprina
New Contributor II

Re: Two calendars in one chart

I have the same result

vishsaggi
Esteemed Contributor III

Re: Two calendars in one chart

Can you share your data model?

Re: Two calendars in one chart

May be share sample application it demonstrates the issue

vchuprina
New Contributor II

Re: Two calendars in one chart

Re: Two calendars in one chart

May be helpful -- Canonical Date