<?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: Optimize AGGR() function inside a trigger in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626448#M230298</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not clear what you're trying to achieve. &lt;/P&gt;&lt;P&gt;I thought it's the point since you reset the selections in your original expression.&lt;/P&gt;&lt;P&gt;Remove the [Patient MRN]=, under the sum() set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 May 2014 16:45:58 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2014-05-23T16:45:58Z</dc:date>
    <item>
      <title>Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626445#M230295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a few variable input boxes that allows the user to filter patients in a healthcare application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One filter is for # of admissions.&amp;nbsp; The field &lt;STRONG&gt;Admission_Flag&lt;/STRONG&gt; is either 1 or 0, and the variable &lt;STRONG&gt;v_Admissions&lt;/STRONG&gt; is the number of admissions entered into the input box.&amp;nbsp; When a value is entered, this expression is executed and MRN numbers are selected.&amp;nbsp; This runs slow and I would like to improve the performance.&amp;nbsp; Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;='(' &amp;amp; Concat({&amp;lt;[Patient MRN]=,PayorName=,[Payor GL]=,[Payor Level 1]=,[Payor Level 2]=,[Payor Level 3]=&amp;gt;}if(aggr(sum({&amp;lt;[Patient MRN]=,PayorName=,[Payor GL]=,[Payor Level 1]=,[Payor Level 2]=,[Payor Level 3]=&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Admission_Flag),[Patient MRN])&amp;gt;= v_Admissions, [Patient MRN]), '|') &amp;amp; ')'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:15:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626445#M230295</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2014-05-23T14:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626446#M230296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;Try this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;='(' &amp;amp; Concat({&amp;lt;[Patient MRN]={'=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-style: inherit; font-weight: inherit; font-size: 10pt; line-height: 1.5em;"&gt;sum({&amp;lt;[Patient MRN]=,PayorName=,[Payor GL]=,[Payor Level 1]=,[Payor Level 2]=,[Payor Level 3]=&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-style: inherit; font-weight: inherit; font-size: 10pt; line-height: 1.5em;"&gt;Admission_Flag)&amp;gt;=$(&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier;"&gt;v_Admissions&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;'},PayorName=,[Payor GL]=,[Payor Level 1]=,[Payor Level 2]=,[Payor Level 3]=&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'courier new', courier; font-style: inherit; font-weight: inherit;"&gt;[Patient MRN]), '|') &amp;amp; ')'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:36:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626446#M230296</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-05-23T14:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626447#M230297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whiteline, thanks for the reponse.&amp;nbsp; I'm not sure why, but I am unable to get your expression to make any selections on [Patient MRN].&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:48:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626447#M230297</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2014-05-23T14:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626448#M230298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not clear what you're trying to achieve. &lt;/P&gt;&lt;P&gt;I thought it's the point since you reset the selections in your original expression.&lt;/P&gt;&lt;P&gt;Remove the [Patient MRN]=, under the sum() set analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 16:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626448#M230298</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-05-23T16:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626449#M230299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the user enters admissions &amp;gt;= 2, then decided to change that to &amp;gt;=1, the selections have to be reset, so in the expression I am saying [Patient MRN]= so the current selection does not affect the selection that is being made.&amp;nbsp; This is a bit complicated and I'm probably not explaining it as best as I can.&amp;nbsp; Hopefully this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 16:54:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626449#M230299</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2014-05-23T16:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626450#M230300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you upload brief sample ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 18:58:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626450#M230300</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-05-23T18:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626451#M230301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached a very simple example.&amp;nbsp; Please let me know what questions you might have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works really quick on a small data set.&amp;nbsp; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 03:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626451#M230301</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2014-05-28T03:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626452#M230302</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;Please use below expression in test Application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;='(' &amp;amp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PAT_MRN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PAT_MRN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=sum({&amp;lt;[PAT_MRN]=&amp;gt;}ADMIT_FLAG))&amp;gt;= v_Admissions"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[PAT_MRN]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, '|') &amp;amp; ')'&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Perumal A&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 05:37:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626452#M230302</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2014-05-28T05:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626453#M230303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response Perumal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I apply that expression to the variable trigger (both on input and change) there are no selections made to PAT_MRN.&amp;nbsp; The ADMIT_FLAG has to be summed by MRN to select those who are greater than or equal to the input field (v_Admissions).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 11:42:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626453#M230303</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2014-05-28T11:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626454#M230304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi&lt;/P&gt;&lt;P&gt;For me wroking .PFA sample application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 12:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626454#M230304</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2014-05-28T12:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626455#M230305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe it's using the trigger for OnChange instead of OnInput.&amp;nbsp; The OnChange trigger still has my original AGGR expression.&amp;nbsp; They both have to changed for the app to function properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 12:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626455#M230305</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2014-05-28T12:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626456#M230306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; &lt;/P&gt;&lt;P&gt;Now is working .PFA sample application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 09:35:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626456#M230306</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2014-05-29T09:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Optimize AGGR() function inside a trigger</title>
      <link>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626457#M230307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to use that expression in my application and the results were correct.&amp;nbsp; However, the performance seemed about the same.&amp;nbsp; I'm not sure if anything can be done to speed up this operation.&amp;nbsp; The application has to select thousands of MRN #'s when you make an entry in the input box.&amp;nbsp; Perhaps this is the nature of the beast?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I filter on a certain visit type, the app needs to select 200k MRN #'s.&amp;nbsp; I'm not sure how to speed up that operation.&amp;nbsp; We could aggregate these numbers in the load script, but then we would loose the ability to aggr over a certain period of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate the feedback on this thread. If anyone has other ideas, I would love to hear them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 01:52:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimize-AGGR-function-inside-a-trigger/m-p/626457#M230307</guid>
      <dc:creator>phcaptjim</dc:creator>
      <dc:date>2014-06-06T01:52:14Z</dc:date>
    </item>
  </channel>
</rss>

