Professional Documents
Culture Documents
Click Reload
Close the execution progress, open the Table viewer and notice the Origins table is gone
Preview the Bands table and notice that the Queen record remains but New York has been dropped from
this combined table - the scripted “LEFT JOIN (Bands)” placed the priority on retaining ALL records from the
Bands table, whether they had a matching OriginName or not. But any OriginName which had no
matching BandName was lost
Return to the Bands and Origins sheet and verify these findings
Re-open the Script editor, change the LEFT JOIN, to RIGHT JOIN and reload the data.
Return to the Bands and Origins sheet. What does this view reveal about the right join? (Answer = All
cities of origin now appear, whether there is a matching band or not. However, any band that does
not have an OriginID (Queen) is dropped)
©2016 QlikTech International AB. All rights reserved. Qlik®, Qlik Sense®, QlikView®, QlikTech®, Qlik® Cloud, Qlik® DataMarket, Qlik® Analytics Platform and the Qlik logos
are trademarks of QlikTech International AB which have been registered in multiple countries. Other marks and logos mentioned herein are trademarks or registered trademarks
of their respective owners. Use of any and all of the foregoing is subject to the written approval of Qlik.
Go back to the Script editor. change the RIGHT JOIN to an INNER JOIN and then reload the data again
Return to the Bands and Origins sheet. How do you explain the results now? (Answer = The INNER JOIN
keeps only those rows where both tables have matching key values)
Return to the Script editor, change the INNER JOIN to an OUTER JOIN, and then reload the data.
Go back to the Bands and Origins sheet. You now see that all the data from both sides of the join are
present (Including Queen from the left table and New York from the right table)
In this exercise, you learned to use the join technique to combine tables. Care must always be taken when
determining which join qualification type to use (LEFT, RIGHT, INNER, OUTER). Depending upon the
requirements of the document, rows of data can be removed from the tables. Be sure to use the correct
type.
In addition, when a table contains numeric field data, ensure you are not inadvertently creating numerical
inconsistencies. Always check to see if the document requirements call for aggregate functions such as
SUM() on these fields on the front-end sheets.
©2016 QlikTech International AB. All rights reserved. Qlik®, Qlik Sense®, QlikView®, QlikTech®, Qlik® Cloud, Qlik® DataMarket, Qlik® Analytics Platform and the Qlik logos
are trademarks of QlikTech International AB which have been registered in multiple countries. Other marks and logos mentioned herein are trademarks or registered trademarks
of their respective owners. Use of any and all of the foregoing is subject to the written approval of Qlik.