<?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: Set analysis with multiple tables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80892#M5346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hope this helps/this could be your staring point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/200580_1.PNG" style="height: 426px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2018 20:16:18 GMT</pubDate>
    <dc:creator>Qrishna</dc:creator>
    <dc:date>2018-04-23T20:16:18Z</dc:date>
    <item>
      <title>Set analysis with multiple tables</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80889#M5343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to calculate the % of patients with Blood Pressure under 140/90, by year. Seems straightforward, but I'm in need of advice on the best approach to keep only certain patients, based on a comparison of dates from two tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data are in tables with these fields (among others):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Conditions&lt;/STRONG&gt;: PatientID, ConditionStartDate&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;BP&lt;/STRONG&gt;: PatientID, ObservationDate, Systolic, Diastolic&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Visits&lt;/STRONG&gt;: PatientID, VisitDate&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a bar chart with Year of Visit as the dimension, and % of patients whose last reading of each year was under 140/90. I can include only patients whose ConditionStartDate is earlier than July 1 of the chart Year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I combine the data into a new table so that I can perform the date comparison with set analysis, like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EventRowID={"=ConditionStartDate&amp;lt;MakeDate(year(VisitDate), 7, 1)"} &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or should I use the p() function, in my chart measure, with year fields created in the load script, like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VisitYear=p(BPYear)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Or something else altogether?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 18:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80889#M5343</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2018-04-23T18:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with multiple tables</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80890#M5344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;some sample data please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 18:03:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80890#M5344</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2018-04-23T18:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with multiple tables</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80891#M5345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna, thanks for the quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BP:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 597px; height: 149px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;PatientID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ObservationDate&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Systolic&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Diastolic&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;545&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4/9/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;122&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;76&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;545&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10/10/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;139&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;678&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3/1/2016&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;134&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;79&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;678&lt;/TD&gt;&lt;TD&gt;2/4/2017&lt;/TD&gt;&lt;TD&gt;141&lt;/TD&gt;&lt;TD&gt;91&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;910&lt;/TD&gt;&lt;TD&gt;5/5/2015&lt;/TD&gt;&lt;TD&gt;119&lt;/TD&gt;&lt;TD&gt;69&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Visits:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="149" style="border: 1px solid #000000; border-image: none; width: 274px; height: 150px;" width="273"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;PatientID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;VisitDate&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;545&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1/9/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;545&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4/9/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;678&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3/1/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;678&lt;/TD&gt;&lt;TD&gt;1/10/2017&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;910&lt;/TD&gt;&lt;TD&gt;5/5/2015&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conditions:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="99" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 280px; height: 97px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;PatientID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;ConditionStartDate&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;545&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2/10/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;678&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;9/10/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;910&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;11/11/2010&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bar chart will show Visit Years 2015, 2016, 2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Patient 545 will appear in 2016 and 2017 (because his condition started before 7/1 of both years).&lt;/P&gt;&lt;P&gt;Patient 678 will appear in 2017 only (because her condition started after 7/1/2016 but before 7/1/2017).&lt;/P&gt;&lt;P&gt;Patient 910 will appear in 2015 only (because he had no visits in 2016 or 2017).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 18:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80891#M5345</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2018-04-23T18:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with multiple tables</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80892#M5346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hope this helps/this could be your staring point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/200580_1.PNG" style="height: 426px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 20:16:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80892#M5346</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2018-04-23T20:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with multiple tables</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80893#M5347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your help. So generally, do you put all fields into one table, when you need do filtering that compares fields?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 21:18:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80893#M5347</guid>
      <dc:creator>Lauri</dc:creator>
      <dc:date>2018-04-23T21:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis with multiple tables</title>
      <link>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80894#M5348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As i was having 2 fields (you can map or do left join) and the data is straight forward i have merged the two tables.but if theres is granularity of data or if theres is case where you shouldnt merge then just associate those two tables with a common field and do the analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 21:31:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-analysis-with-multiple-tables/m-p/80894#M5348</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2018-04-23T21:31:54Z</dc:date>
    </item>
  </channel>
</rss>

