<?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 Deriving fields from multiple resident tables in Load in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Deriving-fields-from-multiple-resident-tables-in-Load/m-p/1357899#M30341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to derive a few calculated fields during a load, and to group on an ID field. The calculated fields are based on one resident table, and the ID is based on another resident table. The two resident tables do not have fields in common, but there is another table that I can use to join them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My resident tables are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;PartA (fields: PatientID, PartAKey)&lt;/LI&gt;&lt;LI&gt;PartA_DX (fields: PartAKey, DX)&lt;/LI&gt;&lt;LI&gt;DX_Groups (fields: DX, &lt;SPAN style="font-size: 13.3333px;"&gt;DX_ccs_category&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a Diabetes field and a Hypertension field that indicates yes or no for each patient ID. My first thought was to do this:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #339966; font-family: 'courier new', courier;"&gt;Load &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;PatientID&lt;/SPAN&gt;,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Max(If(match(DX_ccs_category, '49', '50')&amp;gt;0, 1, 0)) as Diabetes,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Max(If(match(DX_ccs_category, '88', '89')&amp;gt;0, 1, 0)) as Hypertension&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Resident DX_Groups&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Group By &lt;SPAN style="font-size: 13.3333px;"&gt;PatientID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Inner join (PartA_Dx) Load PartAKey Resident PartA_Dx;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #339966; font-family: 'courier new', courier;"&gt;Inner Join (PartA) Load ID Resident PartA;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this does not work; Qlik says 'field not found - PatientID. I suspect there is a good way to achieve my goal... Any tips would be great! Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Aug 2017 16:30:30 GMT</pubDate>
    <dc:creator>Lauri</dc:creator>
    <dc:date>2017-08-06T16:30:30Z</dc:date>
    <item>
      <title>Deriving fields from multiple resident tables in Load</title>
      <link>https://community.qlik.com/t5/App-Development/Deriving-fields-from-multiple-resident-tables-in-Load/m-p/1357899#M30341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to derive a few calculated fields during a load, and to group on an ID field. The calculated fields are based on one resident table, and the ID is based on another resident table. The two resident tables do not have fields in common, but there is another table that I can use to join them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My resident tables are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;PartA (fields: PatientID, PartAKey)&lt;/LI&gt;&lt;LI&gt;PartA_DX (fields: PartAKey, DX)&lt;/LI&gt;&lt;LI&gt;DX_Groups (fields: DX, &lt;SPAN style="font-size: 13.3333px;"&gt;DX_ccs_category&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a Diabetes field and a Hypertension field that indicates yes or no for each patient ID. My first thought was to do this:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #339966; font-family: 'courier new', courier;"&gt;Load &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;PatientID&lt;/SPAN&gt;,&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Max(If(match(DX_ccs_category, '49', '50')&amp;gt;0, 1, 0)) as Diabetes,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Max(If(match(DX_ccs_category, '88', '89')&amp;gt;0, 1, 0)) as Hypertension&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Resident DX_Groups&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Group By &lt;SPAN style="font-size: 13.3333px;"&gt;PatientID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #339966;"&gt;Inner join (PartA_Dx) Load PartAKey Resident PartA_Dx;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #339966; font-family: 'courier new', courier;"&gt;Inner Join (PartA) Load ID Resident PartA;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this does not work; Qlik says 'field not found - PatientID. I suspect there is a good way to achieve my goal... Any tips would be great! Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Aug 2017 16:30:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Deriving-fields-from-multiple-resident-tables-in-Load/m-p/1357899#M30341</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2017-08-06T16:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Deriving fields from multiple resident tables in Load</title>
      <link>https://community.qlik.com/t5/App-Development/Deriving-fields-from-multiple-resident-tables-in-Load/m-p/1357900#M30342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hi Lauri, can you try this?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;// Join patient data in a temporal table&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;joinData:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp; PatientID&lt;/SPAN&gt;,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; PartAKey,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Resident&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PartA;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;// Add &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PartA_DX data&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; to temporal table&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Inner Join (joinData) Load PartAKey, DX Resident &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PartA_DX &lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;// Add &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DX_Groups data to temporal table&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Inner Join (joinData) Load PartAKey, DX Resident &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DX_Groups &lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;// Create calculated fields in final table&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Data:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LOAD PatiendID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; Max(If(match(DX_ccs_category, '49', '50')&amp;gt;0, 1, 0)) as Diabetes,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp; Max(If(match(DX_ccs_category, '88', '89')&amp;gt;0, 1, 0)) as Hypertension&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Resident &lt;SPAN style="font-size: 13.3333px;"&gt;joinData&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Group By PatientID;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;// Delete temporal table&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;DROP table &lt;SPAN style="font-size: 13.3333px;"&gt;joinData;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Aug 2017 17:21:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Deriving-fields-from-multiple-resident-tables-in-Load/m-p/1357900#M30342</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2017-08-06T17:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Deriving fields from multiple resident tables in Load</title>
      <link>https://community.qlik.com/t5/App-Development/Deriving-fields-from-multiple-resident-tables-in-Load/m-p/1357901#M30343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brilliant, Ruben! Clearly, I had misunderstood how to do joins. Thank you so much for your quick help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 15:14:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Deriving-fields-from-multiple-resident-tables-in-Load/m-p/1357901#M30343</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2017-08-07T15:14:00Z</dc:date>
    </item>
  </channel>
</rss>

