Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple Dates in multiple tables - Linking them

Hi,

I'm new to QlikSense.

I have data in four sheets - "Booking","Posting","Expense","Hostel"

Each of these sheets contain multiple date columns:

Booking Table: [Booked Date],[Arrival Date],[Departure Date],[Void Date],[No Show Date],[Cancelled Date]

Posting Table: [Date]

Expense Table :[Voucher Date]

Hostel Table: [Date]

Can I combine these dates into a single calendar? I want to use date as a filter to calculate various fields from these tables.

Thanks

1 Solution

Accepted Solutions
sunny_talwar

Can you just attach it here (I don't have access to Google Drive at my work)

Uploading a Sample

View solution in original post

10 Replies
sunny_talwar

Try this out:

Canonical Date

Not applicable
Author

Hey Sunny T,

Can you help me out with this in a bit more detail?

Can you provide me with a script for creating this canonical date? Booking table should be the fine grain I think.

sunny_talwar

Provide me with the raw data and I might be able to help you out

Not applicable
Author

Hi Sunny,

Here is the link containing the raw data.

Raw Data - Google Drive

Thanks a ton for the help

sunny_talwar

Can you just attach it here (I don't have access to Google Drive at my work)

Uploading a Sample

Not applicable
Author

Sure ,

Here is the attached sample.

Jeet_007
Partner - Contributor II
Partner - Contributor II

Hello Sunny sir,

I am facing the same situation and i got stuck in how to link Canonical Dates with Link Table

So can you please share the script /  qvf / qvw for the dataset  present .  Hope you will  share it asap

 

 

Regards.

Jeet_007
Partner - Contributor II
Partner - Contributor II

Hello @sunny_talwar 

I am facing the same situation and i got stuck in how to link Canonical Dates with Link Table

So can you please share the script /  qvf / qvw for the dataset  present  below .  
Hope you will  share it asap

Regards.

kumarravi
Contributor III
Contributor III

Hey ,

(For reference I will use only 2 tables of yours, it is very similar for rest)

You can follow the following steps to do this : 

Step 1 : Create Date, month, year column using Date column in each table

Posting Table: 

Date([Date]) as Posting_date,

Month(Date([Date])) as Posting_month,

Year(Date([Date])) as Posting_year

Expense Table :

Date([Voucher Date]) as Expense_date,

Month(Date([Voucher Date])) as Expense_month,

Year(Date([Voucher Date])) as Expense_year

Step 2: Create a Link Table

Link_table_1 : 

Load Distinct 

Posting_date as Date,

Posting_month as Month,

Posting_year as Year

Resident [Posting table];

 

Concatenate Link_table_1

 

Load

Expense_date as Date,

Expense_month as Month,

Expense_year as Year

Resident [Expense table];

NoConcatenate

 

Step 3: Create a new table and drop the older one

LINK_TABLE:

Load

Date,

Month,

Year

Resident Link_table_1;

Drop Link_table_1;

 

 

Happy Learning 🙂 !