<?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 nested aggregation and set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/nested-aggregation-and-set-analysis/m-p/521549#M194879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have hard time understanding the difference between this two expressions. I think they should return the same thing but the second one should work faster. Am I right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg({$&amp;lt;[Place of Service Code]={11}&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; Aggr&lt;/P&gt;&lt;P&gt;&amp;nbsp; ( Max( %CHARGE_ENTRY_DAY_KEY) - Max( %SERVICE_DAY_KEY)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,%PATIENT_ENCOUNTER_ID, [CPT Code]&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(&lt;/P&gt;&lt;P&gt;&amp;nbsp; Aggr&lt;/P&gt;&lt;P&gt;&amp;nbsp; ( Max( {$&amp;lt;[Place of Service Code]={11}&amp;gt;} %CHARGE_ENTRY_DAY_KEY) - Max( {$&amp;lt;[Place of Service Code]={11}&amp;gt;} %SERVICE_DAY_KEY)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,%PATIENT_ENCOUNTER_ID, [CPT Code]&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jan 2014 14:44:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-01-16T14:44:03Z</dc:date>
    <item>
      <title>nested aggregation and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/nested-aggregation-and-set-analysis/m-p/521549#M194879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have hard time understanding the difference between this two expressions. I think they should return the same thing but the second one should work faster. Am I right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg({$&amp;lt;[Place of Service Code]={11}&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; Aggr&lt;/P&gt;&lt;P&gt;&amp;nbsp; ( Max( %CHARGE_ENTRY_DAY_KEY) - Max( %SERVICE_DAY_KEY)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,%PATIENT_ENCOUNTER_ID, [CPT Code]&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(&lt;/P&gt;&lt;P&gt;&amp;nbsp; Aggr&lt;/P&gt;&lt;P&gt;&amp;nbsp; ( Max( {$&amp;lt;[Place of Service Code]={11}&amp;gt;} %CHARGE_ENTRY_DAY_KEY) - Max( {$&amp;lt;[Place of Service Code]={11}&amp;gt;} %SERVICE_DAY_KEY)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,%PATIENT_ENCOUNTER_ID, [CPT Code]&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 14:44:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-aggregation-and-set-analysis/m-p/521549#M194879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-16T14:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: nested aggregation and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/nested-aggregation-and-set-analysis/m-p/521550#M194880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i did some tests and looks like while results are the same, the second expression works 2-3 times faster. I guess it makes sense because aggr filters data first so outer aggregation has less data to work with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 17:46:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/nested-aggregation-and-set-analysis/m-p/521550#M194880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-16T17:46:21Z</dc:date>
    </item>
  </channel>
</rss>

