<?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 Identifying a subset of data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141946#M21528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rolf,&lt;/P&gt;&lt;P&gt;please provide a short example we can ply arround with.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Apr 2009 20:46:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-04-21T20:46:30Z</dc:date>
    <item>
      <title>Identifying a subset of data</title>
      <link>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141945#M21527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some help for a script:&lt;/P&gt;&lt;P&gt;I have allready two tables with patients and diagnoses which are 1:n related via a patient ID. They are loaded from another dataset via the binary command.&lt;/P&gt;&lt;P&gt;Now I have a third table with let say 30 diagnoses (loaded from Excel) and want to classify all patients whether they have one or more of these diagnoses (1) or not (2).&lt;/P&gt;&lt;P&gt;As a result I want to have a new table with two fields the distinct patient ID and the class marker.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rolf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 17:05:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141945#M21527</guid>
      <dc:creator />
      <dc:date>2009-04-21T17:05:32Z</dc:date>
    </item>
    <item>
      <title>Identifying a subset of data</title>
      <link>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141946#M21528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rolf,&lt;/P&gt;&lt;P&gt;please provide a short example we can ply arround with.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 20:46:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141946#M21528</guid>
      <dc:creator />
      <dc:date>2009-04-21T20:46:30Z</dc:date>
    </item>
    <item>
      <title>Identifying a subset of data</title>
      <link>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141947#M21529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rainer,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've attached an excel-file with three tables. The first two are 1:n related via PAT_ID.&lt;/P&gt;&lt;P&gt;I want now in my QV-file the first and the second table (Patients and their diagnoses) and a third table that indicates the occurrence or non-occurrence of one or more diagnoses from the third table 'TBL_Markerdiag' in the 'TBL_DIAG' for every single patient.&lt;/P&gt;&lt;P&gt;The resulting new table from this sample should be:&lt;/P&gt;&lt;P&gt;PAT_ID | Occurence&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;1 | yes&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;2 | yes&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;3 | no&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;4 | yes&lt;/P&gt;&lt;P&gt;The table TBL_Markerdiag can be dropped after that.&lt;/P&gt;&lt;P&gt;This a very small sample. Marker diagnoses can number up to 100 and TBL_PAT and TBL_DIAG can comprise up to 100.000 and 300.000 rows respectively.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rolf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 21:27:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141947#M21529</guid>
      <dc:creator />
      <dc:date>2009-04-21T21:27:02Z</dc:date>
    </item>
    <item>
      <title>Identifying a subset of data</title>
      <link>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141948#M21530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load the tables using the following load statements. Note the Diagnose has an extra field, not in the spreadsheet but added during the load, that marks those Diagnoses that you want to mark.&lt;/P&gt;&lt;P&gt;Directory;&lt;BR /&gt;LOAD&lt;BR /&gt; Diagnose,&lt;BR /&gt; 1 as DiagnoseCount&lt;BR /&gt;FROM Test.xls (biff, embedded labels, table is TBL_Markerdiag$);&lt;BR /&gt;&lt;BR /&gt;Directory;&lt;BR /&gt;LOAD&lt;BR /&gt; PAT_ID&lt;BR /&gt;FROM Test.xls (biff, embedded labels, table is TBL_PAT$);&lt;BR /&gt;&lt;BR /&gt;Directory;&lt;BR /&gt;LOAD&lt;BR /&gt; PAT_ID,&lt;BR /&gt; Diagnose&lt;BR /&gt;FROM Test.xls (biff, embedded labels, table is TBL_DIAG$);&lt;/P&gt;&lt;P&gt;Then, somewhere in your displayed objects, add an expression&lt;/P&gt;&lt;P&gt;if(Sum (DiagnoseCount)&amp;gt;0, 'Yes', 'No')&lt;/P&gt;&lt;P&gt;which you can display with the patient ID to show if they are marked (or did you really want it in the script?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 21:54:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141948#M21530</guid>
      <dc:creator />
      <dc:date>2009-04-21T21:54:01Z</dc:date>
    </item>
    <item>
      <title>Identifying a subset of data</title>
      <link>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141949#M21531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want it in the script because I need it as a dimension so I can distinguish patients that have one or more marker diagnoses from patients that don't have any at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rolf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 22:03:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141949#M21531</guid>
      <dc:creator />
      <dc:date>2009-04-21T22:03:20Z</dc:date>
    </item>
    <item>
      <title>Identifying a subset of data</title>
      <link>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141950#M21532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rolf,&lt;/P&gt;&lt;P&gt;If I understood you problem correctly, then probably you can do something like this&lt;/P&gt;&lt;P&gt;Pat:&lt;BR /&gt;LOAD&lt;BR /&gt; PAT_ID&lt;BR /&gt;FROM Path;&lt;/P&gt;&lt;P&gt;tmpDig:&lt;BR /&gt;LOAD&lt;BR /&gt; PAT_ID,&lt;BR /&gt; Diagnose&lt;BR /&gt;FROM Path;&lt;BR /&gt;//Data you are fetching from Excel&lt;BR /&gt;LEFT JOIN&lt;BR /&gt;LOAD&lt;BR /&gt; PAT_ID&lt;BR /&gt; Diagnose,&lt;BR /&gt; 1 as ExcelFileFlag&lt;BR /&gt;FROM Test.xls;&lt;/P&gt;&lt;P&gt;GetDigCount:&lt;BR /&gt;LOAD PAT_ID,&lt;BR /&gt;COUNT(Diagnose) as DigCount&lt;BR /&gt;RESIDENT tmpDig&lt;BR /&gt;GROUP BY PAT_ID;&lt;/P&gt;&lt;P&gt;DIG:&lt;BR /&gt;LOAD&lt;BR /&gt; PAT_ID,&lt;BR /&gt; Diagnose&lt;BR /&gt;RESIDENT tmpDig;&lt;BR /&gt;INNER JOIN&lt;BR /&gt;LOAD PAT_ID,&lt;BR /&gt;DigCount&lt;BR /&gt;RESIDENT GetDigCount;&lt;/P&gt;&lt;P&gt;DROP TABLE tmpDig,GetDigCount;&lt;/P&gt;&lt;P&gt;Now Use your DIG table to get the information&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 00:45:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141950#M21532</guid>
      <dc:creator />
      <dc:date>2009-04-22T00:45:12Z</dc:date>
    </item>
    <item>
      <title>Identifying a subset of data</title>
      <link>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141951#M21533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rolf,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is what you're looking for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;diag:&lt;BR /&gt;LOAD Diagnose as diag&lt;BR /&gt;FROM Test.xls (biff, embedded labels, table is TBL_Markerdiag$);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Directory;&lt;BR /&gt;LOAD PAT_ID&lt;BR /&gt;FROM Test.xls (biff, embedded labels, table is TBL_PAT$);&lt;BR /&gt;&lt;BR /&gt;Test:&lt;BR /&gt;LOAD PAT_ID,&lt;BR /&gt; PAT_ID as PAT_ID_Yes,&lt;BR /&gt; Diagnose,&lt;BR /&gt; 'Yes' as Occurence&lt;BR /&gt;FROM Test.xls (biff, embedded labels, table is TBL_DIAG$)&lt;BR /&gt;where exists (diag, Diagnose) ;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;concatenate ( Test )&lt;BR /&gt;LOAD PAT_ID,&lt;BR /&gt; Diagnose,&lt;BR /&gt; 'No' as Occurence&lt;BR /&gt;FROM Test.xls (biff, embedded labels, table is TBL_DIAG$)&lt;BR /&gt;where not exists (diag, Diagnose) and not exists( PAT_ID_Yes, PAT_ID) ;&lt;BR /&gt;&lt;BR /&gt;drop table diag;&lt;BR /&gt;drop field PAT_ID_Yes;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 00:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Identifying-a-subset-of-data/m-p/141951#M21533</guid>
      <dc:creator />
      <dc:date>2009-04-22T00:53:28Z</dc:date>
    </item>
  </channel>
</rss>

