<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to combine two separate tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941997#M468062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if attached working can help you to kick-start -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="710.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100127_710.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;CrossTable(DiagNo, Diag_Code_No, 2)&lt;/P&gt;&lt;P&gt;LOAD Case#,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Case Desc],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag4,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag5&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\..\Case Table.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RefTable:&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;Diag_Code_No,Diag_Group,Diag_Description&lt;/P&gt;&lt;P&gt;1,Group1,Fever Mild&lt;/P&gt;&lt;P&gt;2,Group1,Fever Medium&lt;/P&gt;&lt;P&gt;3,Group1,Fever High&lt;/P&gt;&lt;P&gt;4,Group2, Malaria Low&lt;/P&gt;&lt;P&gt;5,Group2, Malaria Medium&lt;/P&gt;&lt;P&gt;6,Group2, Malaria Low&lt;/P&gt;&lt;P&gt;7,Group3, Lever layer prob&lt;/P&gt;&lt;P&gt;8,Group3, Lever Core prob ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case excel used is -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="505"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Case#&lt;/TD&gt;&lt;TD width="121"&gt;Case Desc&lt;/TD&gt;&lt;TD width="64"&gt;Diag1&lt;/TD&gt;&lt;TD width="64"&gt;Diag2&lt;/TD&gt;&lt;TD width="64"&gt;Diag3&lt;/TD&gt;&lt;TD width="64"&gt;Diag4&lt;/TD&gt;&lt;TD width="64"&gt;Diag5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1&lt;/TD&gt;&lt;TD&gt;Temperature High&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD&gt;Cough Problem&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;TD align="right"&gt;6&lt;/TD&gt;&lt;TD align="right"&gt;7&lt;/TD&gt;&lt;TD align="right"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Sep 2015 05:22:17 GMT</pubDate>
    <dc:creator>Digvijay_Singh</dc:creator>
    <dc:date>2015-09-26T05:22:17Z</dc:date>
    <item>
      <title>How to combine two separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941995#M468060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have to sets of data that I need and do not know how to use.&amp;nbsp; One table (excel spreadsheet) includes a list of cases and its associated visit information.&amp;nbsp; The second table (second excel spreadsheet) is a reference table that includes list of diagnoses of interest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the cases table with all the "raw data", I have 5 columns referencing the case's diagnoses (Diag1, Diag2, Diag3, Diag4, Diag5).&amp;nbsp; The reference table only has 3 columns (Diag_Code_No, Diag_Group, Diag_Description).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create a table or expression or variable that I can use that uses the diagnosis reference table and assigns one of the Diag_Group to each case based on those 5 columns from the cases table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If more than one Diag-Group applies, it will only assign the one with the the highest ranked Diagnosis.&amp;nbsp; For example, if one case has a Diagnosis of choice in Diag1 and Diag 3, the Diag-Group assigned to it will be for Diag1 as this is considered the primary diagnosis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I accomplish this or what tutorial can I reference to get started?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is some sample data and what I need it to look like.&amp;nbsp; I need the final table to have a column that assigns the Grouped ICD9 code to that line item (visit) based on the reference spreadsheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe it is a form of concatanate/join, but am unsure how to do it, how to script it (syntaxt), etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see what you mean and why it is hard.&amp;nbsp; I have made changes to the reference table so that it would have the Diagnosis1 column match by name.&amp;nbsp; The formats are the same too, so it should not be an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the updated documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I thought should work was the following, but I know it is wrong and need help finishing up.&amp;nbsp; The idea is to make this the load script that would create the master combined table that will later be loaded as a separate file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;RawData:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Note here that DiagCode1 is a field in this data&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;C&gt;&lt;BR /&gt;(&lt;/C&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;ooxml&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;embedded&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1);&lt;BR /&gt;&lt;BR /&gt;ReferenceTbl:&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Join&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (RawData)&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DiagCode1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&amp;nbsp; // Note that this is the column the two tables will have in common to join on&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[ICD-9 Code Description]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;C&gt;&lt;BR /&gt;(&lt;/C&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;ooxml&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;embedded&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Final);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;STORE&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; ReferenceTbl &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;C&gt;(&lt;/C&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;txt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 18:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941995#M468060</guid>
      <dc:creator />
      <dc:date>2015-09-25T18:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941996#M468061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karen,&lt;/P&gt;&lt;P&gt;In general , we can combine two tables by using &lt;SPAN style="color: #0000ff;"&gt;join,concatenate&lt;/SPAN&gt; functions.&lt;/P&gt;&lt;P&gt;Please attach some sample data of two tables in a excel format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Sep 2015 02:15:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941996#M468061</guid>
      <dc:creator>qlikviewwizard</dc:creator>
      <dc:date>2015-09-26T02:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941997#M468062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if attached working can help you to kick-start -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="710.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100127_710.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;CrossTable(DiagNo, Diag_Code_No, 2)&lt;/P&gt;&lt;P&gt;LOAD Case#,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Case Desc],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag4,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diag5&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\..\Case Table.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RefTable:&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;Diag_Code_No,Diag_Group,Diag_Description&lt;/P&gt;&lt;P&gt;1,Group1,Fever Mild&lt;/P&gt;&lt;P&gt;2,Group1,Fever Medium&lt;/P&gt;&lt;P&gt;3,Group1,Fever High&lt;/P&gt;&lt;P&gt;4,Group2, Malaria Low&lt;/P&gt;&lt;P&gt;5,Group2, Malaria Medium&lt;/P&gt;&lt;P&gt;6,Group2, Malaria Low&lt;/P&gt;&lt;P&gt;7,Group3, Lever layer prob&lt;/P&gt;&lt;P&gt;8,Group3, Lever Core prob ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case excel used is -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="505"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="64"&gt;Case#&lt;/TD&gt;&lt;TD width="121"&gt;Case Desc&lt;/TD&gt;&lt;TD width="64"&gt;Diag1&lt;/TD&gt;&lt;TD width="64"&gt;Diag2&lt;/TD&gt;&lt;TD width="64"&gt;Diag3&lt;/TD&gt;&lt;TD width="64"&gt;Diag4&lt;/TD&gt;&lt;TD width="64"&gt;Diag5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1&lt;/TD&gt;&lt;TD&gt;Temperature High&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD&gt;Cough Problem&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;TD align="right"&gt;6&lt;/TD&gt;&lt;TD align="right"&gt;7&lt;/TD&gt;&lt;TD align="right"&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Sep 2015 05:22:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941997#M468062</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-09-26T05:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941998#M468063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I checked the new attachments shared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Earlier I assumed Diag No and your ICD-9 Code can be joined but from your shared files I couldn't see possibility of linking them. I tried to see similarities between 'Group' Column and 'Diag1_Description' column but its not helping as both are created independently with no intention to keep them aligned with each other, so difficult to link. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Qlikview if two tables are having fields with same name, they are internally joined automatically. So somehow we need to find related field from business perspective between your tables so that we can join them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still feel &lt;SPAN style="font-size: 13.3333px;"&gt;Diag# and '&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ICD-9 Code' should have been linked by some way but I am not able to figure out from the information shared so far.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 04:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941998#M468063</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-10-02T04:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine two separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941999#M468064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIK Your script should be working fine as long as you have linked/valid data in both tables through &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.6667px;"&gt;DiagCode1.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 17:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-combine-two-separate-tables/m-p/941999#M468064</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2015-10-02T17:04:15Z</dc:date>
    </item>
  </channel>
</rss>

