Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
PGeorge
Contributor III
Contributor III

Connect a filter pane date field to 2 different table date fields

Hi everyone,

I want to add a filter pane date field which will be connected to 2 (or more) different date fields from 2 different tables.

I was thinking of creating a third table using a Data Load Editor script including the 2 tables' date field values and using the new table field in filter pane.

Is there any other more optimal way to implement the above scenario?

Thanks.

Labels (3)
1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

I'm afraid that associating these date fields in a separate link table may cause accidental linking, synthetic keys and circular references. The best data modeling solution for these issues is what's called a "Canonical Date" - if you Google it, you should find several blog articles that describe it.

Another solution, which I consider a bit risky, is to create a separate Calendar table that is not associated with other date fields, as a "data island". Here you need to be careful not to cause a Cartesian Join. The ONLY acceptable form of using this island is within Set Analysis folders, like this for example:

sum( {<OrderDate = P(CalendarDate)>} Value)

sum( {<ShipDate = P(CalendarDate)>} Value)

sum( {<InvoiceDate = P(CalendarDate)>} Value)

This way, you can make selections on the Calendar fields and then tie all other dates to it using Set Analysis. You just need to be careful not to compare these dates in any other way. For example, this formula:

sum( IF(OrderDate = CalendarDate, Value))

would cause a Cartesian Join between your fact table and the island calendar.

To learn more advanced development techniques, check out the agenda of the Masters Summit for Qlik - coming soon to Orlando and to Dublin!