Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
whereismytowel
Contributor
Contributor

How to synchronise / filter by date if i have different date columns in 2 different tables

Hello, i am new to qlik and have an interesting task i could use some help with

I have 2 different Tables, Table1 and Table 2, which have both a column for the Date of the entrys, Date1 and Date2 as well as a column Data1 and Data2.

whereismytowel_2-1668012350135.png

My Problem is this for example:

i need to display all the Data for  01.01.22. If i were to use a filter for that date on Table1 my result would be this:

whereismytowel_4-1668012800521.png

This is of course since i only used a filter on Date1 so all entrys with Date2 will still be shown.

I need to find a solution without creating 2 filters manually for Date1 and Date2.

So my question is if there is a way so that if i create a filter for Date1 the same filter is automatically applied to Date2?

So a filter for 01.01.22 is created for table1 and automatically a filter with the same date is created for table2.

If this is not possible another idea would be to create a new Column for the Date, Date3 for example and make both table1 and table2 use Date3 so that if i were to use a filter on Date3 it would filter the data in table1 and table2.

Although i have no idea how i would be able to implement that so all advice is welcome

If this is not possible all ideas to make the date of both tables work together and display results for a certain date are very welcome.

Best regards.

Labels (4)
1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The way to approach this in Qlik is to use a canonical (common) date with a link table.  An example for your date creating a common field named "Date". 

Table1:
LOAD * Inline [

Date1, Data1
01.01.22, a
02.01.22, b
03.01.22, c
]
;
Table2:
LOAD * Inline [

Date2, Data2
01.01.22, d
02.01.22, e
03.01.22, f
]
;
DateLink:
LOAD Date1, Date1 as Date
Resident Table1;
Concatenate (DateLink)
LOAD Date2, Date2 as Date
Resident Table2; 

Here are a couple of resources. 

https://community.qlik.com/t5/Design/Canonical-Date/ba-p/1463578

Qlikview Cookbook: Tutorial - Using Common Date Dimensions https://qlikviewcookbook.com/recipes/download-info/tutorial-using-common-date-dimensions/

-Rob