Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
Partner
Partner

Two date fields, one master calendar

Hi all,

I have a master calendar that works fine with the "start_date" field that I have in a table called "event". In another table, "link", I have another date field called "link_date".

I would like that when the user filters using the master calendar, his selection affected not only to events, but to links too.

I tried to rename "link_date" as "start_date", but that provokes a loop. What's the best approach to a situation like this?

Thanks,

Juan

6 Replies
Partner
Partner

Re: Two date fields, one master calendar

It would be sthing like this:

here's a script you can use to build a test application and understand how to handle different dates:

SET DateFormat='YYYY-M-D';

Table1:

LOAD * INLINE [

ID, Seq, ActivityDate, Value1

1, 1, 2011-5-10,10

1, 2, 2011-5-12,2

2, 1, 2011-5-12,20

3, 1, 2011-6-15,40

];

Table2:

LOAD recno() as ID, * INLINE [

DepartureDate, ArrivalDate, Value2

2011-6-15,2011-6-16,5

2011-6-15,2011-6-17,10

2011-6-16,2011-6-16,20

];

OtherTable:

LOAD recno() as OtherID, * INLINE [

OtherDate, OtherValue

2011-5-12,2

2011-6-15,3

2011-6-17,5

];

Link:

LOAD

ID

,Seq

,ActivityDate as Date

,'Activity' as DateType

RESIDENT Table1

;

CONCATENATE (Link)

LOAD

ID

,DepartureDate as Date

,'Departure' as DateType

RESIDENT Table2

;

CONCATENATE (Link)

LOAD

ID

,ArrivalDate as Date

,'Arrival' as DateType

RESIDENT Table2

;

CONCATENATE (Link)

LOAD

OtherID

,OtherDate as Date

,'Other' as DateType

RESIDENT OtherTable

;

Calendar:

LOAD *

,date(monthstart(Date),'MMM YYYY') as Month

;

LOAD date(makedate(2011,5,1)+recno()-1) as Date

AUTOGENERATE 61

;

Capture.PNG

Capture.PNG

atkinsow
Valued Contributor II

Re: Two date fields, one master calendar

Similar to what omar has shown.

Canonical Date

lzanetti
New Contributor III

Re: Two date fields, one master calendar

Hi Juan,

I'm in the same situation: i need to create a master calendar that allows me to drive and measure on two tables both having a date field.

Did you solve the situation?

How did you do?

I followe what is shown by Mike Tarallo on this video https://www.youtube.com/watch?v=ek_ITfvCnHw

it works fine if I link the master calendar to one table, but I'm not able to link it to two.

Partner
Partner

Re: Two date fields, one master calendar

Hi Luigi,

Actually I decided to keep both calendars separated. I'm having two different master calendars and it's working for me so far.

If down the road I'm forced to use a single one, I'll post here my findings.

Regards,

Juan

suren946
New Contributor III

Re: Two date fields, one master calendar

Hi Juan,

Can you please post how did you solve this issue - Single calendar with multiple dates in an application

Thanks

Partner
Partner

Re: Two date fields, one master calendar

Hi Surenda,

As I told Luigi, I ended up deciding to have two calendars separated. I didn't create the single one. However, maybe Omar's reply and Wallo's link may help you.


Regards,


Juan