Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Link Tables on More that 1 field

Hi All

I have a challenge as to how to arrange my data so I can link tables on 2 fields.

I have a number of tables

1) Registered Users

2) Documents

3) Chats

4) Help Tickets

There are a number of fields in each table but they all have 2 fields i'm most interested in: Date, Email

I would like to be able to filter my graphs by both date / date range and email address.

If you have a separate graph for each table, then no problem, just keep all the fields isolated with different names.

If however you would like a graph where you can show Documents, Chats and Help Tickets all together then you need to have the x-axiz that has a common Date field, and then multiple different expression where you count something relevant for the y-axiz. This is still ok, but if you want to filter by individual user, so filter on an email address, then i run into an issue that i need to link all the tables on 2 fields, which generates synthetic keys etc.

Any suggestions welcome.

Thanks

JP

1 Reply
ichimiike
Partner - Contributor III
Partner - Contributor III

Hi there,

The easiest option for the dates would be to have a master calendar that each of your tables links into... (see

https://community.qlik.com/message/805213#805213 for more detail on this...

Once the calendar is created, you could have 5 copies of each date...

  1. The 'Main' date that gets pulled into your charts.
  2. 'The same date but with the same name as the field in your 'Registered Users' table
  3. 'The same date but with the same name as the field in your 'Documents' table
  4. 'The same date but with the same name as the field in your 'Chats' table
  5. 'The same date but with the same name as the field in your 'Help Tickets' table

This way, each of your tables links to the Master Calendar and a single date is used from there.

Similarly, I'd create a separate table containing all the unique email addresses and then link each of the tables to this to allow a filter on the 'Main' address entry.

With both of these, make sure the 'linking fields' all have unique names to avoid Synthetic keys.

Hope this helps

Mat