<?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 Disregarding current selections in AGGR function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142597#M505554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="background-color:#ffffff;margin:8px;font-family:Arial, Helvetica, sans-serif;color:#000000;font-size:12px;-webkit-background-clip:initial;-webkit-background-origin:initial;"&gt;&lt;P&gt;Add {1} as the set expression for CONCAT as well. See my example attached.&lt;/P&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2009 03:29:16 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-04-28T03:29:16Z</dc:date>
    <item>
      <title>Disregarding current selections in AGGR function</title>
      <link>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142594#M505551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings.&lt;/P&gt;&lt;P&gt;I'm not even sure where to begin. I am trying to get a list of patient IDs and a total count of these IDs for patients that have visited the office between a range of dates (vDOSStart and vDOSEnd). I am trying to compare the count of visits to another variable, set to a minimum number of visits (vVisitMin). I need this count regardless of other current selections.&lt;/P&gt;&lt;P&gt;I have a variable, VisitSetList set to the following expression:&lt;/P&gt;&lt;P&gt;=CONCAT(DISTINCT AGGR( if(COUNT({1 &amp;lt;EncounterDate={"&amp;gt;=$(vDOSStart)&amp;lt;=$(vDOSEnd)"} &amp;gt;} EncounterDate) &amp;gt;= $(vVisitMin), PatientID ), PatientID), ', ')&lt;/P&gt;&lt;P&gt;The resulting list of PatientID looks great, until I select a fields that disqualifies PatientID. I then loose that PatientID from my list in VisitSetList. I have tried a variety of set expressions, in an effort to include all PatientIDs, but my attempts result in either a null (I'm guessing a bad expression) or it has no effect.&lt;/P&gt;&lt;P&gt;If I'm AGGR on PatientID, is there any way to make it for all PatientID? Am I doing something stupid? Or is this a limitation of AGGR? Or is it because I am not using this function within a chart?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 03:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142594#M505551</guid>
      <dc:creator />
      <dc:date>2009-04-28T03:09:16Z</dc:date>
    </item>
    <item>
      <title>Disregarding current selections in AGGR function</title>
      <link>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142595#M505552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the little I know about the set analysis, the $ identifier makes it depending on selections. I'd try using 1 instead of $ for PatientID.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 03:21:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142595#M505552</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-28T03:21:39Z</dc:date>
    </item>
    <item>
      <title>Disregarding current selections in AGGR function</title>
      <link>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142596#M505553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sally,&lt;/P&gt;&lt;P&gt;first of all - don't panic &lt;IMG alt="Wink" src="http://community.qlik.com/emoticons/emotion-5.gif" /&gt;&lt;/P&gt;&lt;P&gt;Try the same formula, with the prefix ALL after DISTINCT:&lt;/P&gt;&lt;P&gt;=CONCAT(DISTINCT ALL AGGR( if(COUNT({1 &amp;lt;EncounterDate={"&amp;gt;=$(vDOSStart)&amp;lt;=$(vDOSEnd)"} &amp;gt;} EncounterDate) &amp;gt;= $(vVisitMin), PatientID ), PatientID), ', ')&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 03:27:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142596#M505553</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-04-28T03:27:36Z</dc:date>
    </item>
    <item>
      <title>Disregarding current selections in AGGR function</title>
      <link>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142597#M505554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="background-color:#ffffff;margin:8px;font-family:Arial, Helvetica, sans-serif;color:#000000;font-size:12px;-webkit-background-clip:initial;-webkit-background-origin:initial;"&gt;&lt;P&gt;Add {1} as the set expression for CONCAT as well. See my example attached.&lt;/P&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 03:29:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142597#M505554</guid>
      <dc:creator />
      <dc:date>2009-04-28T03:29:16Z</dc:date>
    </item>
    <item>
      <title>Disregarding current selections in AGGR function</title>
      <link>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142598#M505555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Turns out none of your suggestions quite worked. However, you guys gave me a shove in the right direction. I changed my variable to the following:&lt;/P&gt;&lt;P&gt;=CONCAT(DISTINCT {1 &amp;lt;PatientID = {'=COUNT( {1 &amp;lt;EncounterDate={"&amp;gt;=$(vDOSStart)&amp;lt;=$(vDOSEnd)"} &amp;gt;} EncounterDate) &amp;gt;= $(vVisitMin)'}&amp;gt;} PatientID,', ')&lt;/P&gt;&lt;P&gt;And it worked. No longer using the AGGR function at all!&lt;/P&gt;&lt;P&gt;Jay - your qvw example helped a lot. For some reason, the "IF" in the calcuation was causing the results to always include only selected items -- it seemed to ignore the {1} in the sets.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;Sally&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2009 04:14:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Disregarding-current-selections-in-AGGR-function/m-p/142598#M505555</guid>
      <dc:creator />
      <dc:date>2009-05-06T04:14:49Z</dc:date>
    </item>
  </channel>
</rss>

