Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How To Create A Master Calendar For Two Date Fields


I have two tables with different date fields - JoinDate and ReleaseDate from two connected tables.

I want to have a common Time dimension to avoid using both the fields individually for analyzing against the Time (Date,Day,Week,Month fields) dimension.

I do not want to create a seperate master calendar for each date field, rather I'd like to have only one master calendar for all the date fields.

For example, I select March from the Month dimension, I should be able to get:

- value as 1 for No of persons who left in March

- value as 2 for No of persons who joined in March

- value as 3 for all persons in March

How can I use a master calendar to achieve common time dimensions in this scenario?

Please find the sample attached.



1 Reply
Not applicable

Re: How To Create A Master Calendar For Two Date Fields

You can also try something like this for your expression.  This will work for any calendar value such as Year, Month, Qtr etc. 

The format of the dates will need to be the same.

Count ({<ReleaseDate= {'>=$(=MIN(CAL_DATE))<=$(=Max(CAL_DATE))'}>}PersonId)

Count ({<JoinDate= {'>=$(=MIN(CAL_DATE))<=$(=Max(CAL_DATE))'}>}PersonId)

Community Browser