27 July 2022 How do I join tables in Qlik? Share this message Every Friday at Bitmetric we’re posting a new Qlik certification practice question to our LinkedIn company page. Last Friday we asked the following Qlik Data Architect certification practice question: The correct answer is D: Right Join The trick in this question was the load order of the tables. In order to make sure only CarID’s with a target were shown, we needed to right join the first loaded table with the car sales to the table with car targets. All other answers would have kept the CarID’s without a target in the first loaded table. Most often when creating a data model there will be the need to merge tables with each other, whether it is to enrich the table with extra values or as in this case to only load values we want to have loaded. To merge the tables the join statement is used before the load statement. The join statement can also be preceded by one of the following prefixes: inner, outer, left, right. These will determine how the previously loaded table will be merged with the table being loaded. The join statement is then followed by the table we would like to compare the values being loaded with. This has to be a previously loaded table. So the full syntax is: [inner|outer|left|right] Join [(Tablename)] (loadstatement|selectstatement) To visualize let’s take the following two tables and see how each join works: Inner Join An inner join will only keep the rows that are matching in both tables: Outer Join An outer join generates all combinations between both tables: Left Join A left join keeps only those field values in the second table that match the link value (key field) of the first loaded table: Right Join A right join will only keep field values of a previously loaded table matching the link value (key field) of the table being loaded: Now let’s apply this knowledge to the question. We have loaded the Car Sales and the Car Targets tables in that order. We now only want to keep the CarID’s of cars which have a target. This means we have to use the Car Targets table to determine this. So we have to keep the CarID’s from the Car Targets table, which is a right prefix, and since the only one in the question is a right join, that should be the answer: So the final script will be: Other things to notice Instead of join we could also use keep. This works the same way, but instead of merging the tables into one, it will keep both tables (see the explanation above).Concatenate is another way to join tables. Hereby there is no inner, outer, left, right prefix needed, concatenate will simply append the rows from one table to the other. A rule of thumb is, if you have to add columns to the table you use join, if you have to add rows to the table, you use concatenate.If you don’t specify a prefix and just use join, Qlik will automatically assume an outer join. It is advisable to always specify the type of join to keep your scripting clear and understandable. Are these questions too easy for you? If these questions are too easy for you, then you may be ready for the Masters Summit for Qlik. At the Masters Summit for Qlik, we take your Qlik skills to the next level in 3 days with deep dives about: Qlik Data ModellingQlik ScriptingSet Analysis and Advanced AggregationsSolution Architecture & PerformanceEffective VisualizationsPerformance TuningQlik Sense integration The courses are taught by Qlik veterans Rob Wunderlich, Oleg Troyanksy, Bill Lay, Nick Webster and Bitmetric’s Barry Harmsen. Together, this team brings almost 75 years of Qlik experience and has implemented hundreds of successful projects. You can find more information and registration on the Masters Summit for Qlik website. See you next week! That’s it for this week. See you next Friday? And remember: If you have suggestions for questions, we love to hear from you via WhatsApp or at info@bitmetric.nlIf you’re enjoying these questions and want to work on stuff like this every day (but a bit more challenging), we’re always on the lookout for new colleagues. Check our job openings here.For more of these brain teasers, check out our archive of Qlik certification questions and answers.Want to stay up to date about everything Qlik? Then sign up for our newsletter below: How can we help? Feel free to contact us if you have any comments or questions. Call us Mail us 10 August 2022 What happens with preceding zeroes in Qlik Sense? Every Friday at Bitmetric we’re posting a new Qlik certification practice question to our LinkedIn company page. Last Friday we asked the following Qlik Data Architect certification practice question: The correct answer is A. An interesting question with an unexpected result. As many thought it would be the logical answer D, it is in fact something […] Friday Qlik Test Prep Solution 3 August 2022 What is a generic load? Every Friday at Bitmetric we’re posting a new Qlik certification practice question to our LinkedIn company page. Last Friday we asked the following Qlik Data Architect certification practice question: The correct answer is C: A generic load The database which is used in this question is a so called generic database. In this database the column […] Friday Qlik Test Prep Solution 20 July 2022 What is the difference between Alt and Coalesce? Every Friday at Bitmetric we’re posting a new Qlik certification practice question to our LinkedIn company page. Last Friday we asked the following Qlik Data Architect certification practice question: The correct answer is B: Coalesce(SizeName, ’Unknown’) AS SizeName The disparity between the answers this week shows that this function is not well known yet, but Coalesce() […] Friday Qlik Test Prep Solution
10 August 2022 What happens with preceding zeroes in Qlik Sense? Every Friday at Bitmetric we’re posting a new Qlik certification practice question to our LinkedIn company page. Last Friday we asked the following Qlik Data Architect certification practice question: The correct answer is A. An interesting question with an unexpected result. As many thought it would be the logical answer D, it is in fact something […] Friday Qlik Test Prep Solution
3 August 2022 What is a generic load? Every Friday at Bitmetric we’re posting a new Qlik certification practice question to our LinkedIn company page. Last Friday we asked the following Qlik Data Architect certification practice question: The correct answer is C: A generic load The database which is used in this question is a so called generic database. In this database the column […] Friday Qlik Test Prep Solution
20 July 2022 What is the difference between Alt and Coalesce? Every Friday at Bitmetric we’re posting a new Qlik certification practice question to our LinkedIn company page. Last Friday we asked the following Qlik Data Architect certification practice question: The correct answer is B: Coalesce(SizeName, ’Unknown’) AS SizeName The disparity between the answers this week shows that this function is not well known yet, but Coalesce() […] Friday Qlik Test Prep Solution