<?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: complex set analysis syntax-- combining conditions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/complex-set-analysis-syntax-combining-conditions/m-p/411200#M153072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Aggr(NODISTINCT Min(DATE_OUTPT),PAT_MRN_ID)=DATE_OUTPT,1,2) AND If({$&amp;lt;[OUTPT_CALDENS]={"&amp;gt;20"}&amp;gt;},Count(Distinct(PAT_MRN_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Revathy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Apr 2013 05:56:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-04-30T05:56:31Z</dc:date>
    <item>
      <title>complex set analysis syntax-- combining conditions</title>
      <link>https://community.qlik.com/t5/QlikView/complex-set-analysis-syntax-combining-conditions/m-p/411199#M153071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;need to combine these two statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Aggr(NODISTINCT Min(DATE_OUTPT), PAT_MRN_ID) = DATE_OUTPT, 1, 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//this puts a 1 next to the minimum date for every Patient ID (PAT_MRN_ID) and a 2 next to the rest of them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AND &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=COUNT(DISTINCT {$&amp;lt;[OUTPT_CALDENS] = {"&amp;gt;20"}&amp;gt;} PAT_MRN_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// this counts the number of distinct pat id's with CALDENS &amp;gt; 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every date has a Caldens associated and I need to combine these two so that I am counting every PAT_ID where the minimum date has a CALDENS&amp;gt;20. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be much appreicated!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this and it doesn't work:&lt;/P&gt;&lt;P&gt;=If(Aggr(NODISTINCT Min(DATE_OUTPT), PAT_MRN_ID) = DATE_OUTPT, &lt;/P&gt;&lt;P&gt;COUNT(DISTINCT {$&amp;lt;[OUTPT_CALDENS] = {"&amp;gt;20"}&amp;gt;} PAT_MRN_ID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 21:59:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/complex-set-analysis-syntax-combining-conditions/m-p/411199#M153071</guid>
      <dc:creator />
      <dc:date>2013-04-29T21:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: complex set analysis syntax-- combining conditions</title>
      <link>https://community.qlik.com/t5/QlikView/complex-set-analysis-syntax-combining-conditions/m-p/411200#M153072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Aggr(NODISTINCT Min(DATE_OUTPT),PAT_MRN_ID)=DATE_OUTPT,1,2) AND If({$&amp;lt;[OUTPT_CALDENS]={"&amp;gt;20"}&amp;gt;},Count(Distinct(PAT_MRN_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Revathy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2013 05:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/complex-set-analysis-syntax-combining-conditions/m-p/411200#M153072</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-30T05:56:31Z</dc:date>
    </item>
  </channel>
</rss>

