Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamically linking tables: A valid option to LinkTables ?

Dear all,

Lets say that on table 1 we have LinkKeyTable1, and on Table 2 we have a LinkKeyTable2. There are some record on both tables where the values LinkKeyTable1= LinkKeyTable2, and I would like to use this records as a base set for several operations.

Would the use of a calculated dimension like, If(LinkKeyTable1= LinkKeyTable2, …) or the use of this condition on the graph expressions, be sufficient to avoid the use of synthetic key involving the two keys to operate on the set of records that have this common key ?

Have you tried this approach? Is it any better than link-tables and alikes ?

Best regards,

Paulo



1 Reply
johnw
Champion III
Champion III

Yes, using that if() in a calculated dimension or inside of aggregation in a graph expression DOES dynamically link those two tables together for that chart only, and will avoid any connection or synthetic key on these key fields. If you hear people talking about a "date island", they're discussing doing exactly what you propose to take a disconnected set of dates and dynamically connect them to the dates in the real data set despite having different names. So it's a common solution, and may be sufficient for your needs.

But no, I don't consider it a better solution than simply modeling the connection "correctly" in the data model. It is usually a worse solution. In particular, the performance can be horrible if the tables are large. The problem, though, is figuring out how to model the connection "correctly", which can be more difficult than just throwing in an if().

If merely naming the fields the same gives you the results you want, and even if it gives you a synthetic key, I suspect that that would be the best approach. But I can't really say for sure without knowing more about the data model.