<?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: Aggr() and Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537761#M201007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is awesome! I wasn't familiar with the P() and E() functions. Is it possible to use GetFieldSelections() in this set analysis expression? Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;=sum({&amp;lt;PhoneNumber = P({&amp;lt;DataUsageBands = {"=GetFieldSelections(DataUsageBands)"}&amp;gt;}), DataUsageBands= &amp;gt;} DataUsageKB)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Not sure if that syntax is correct. Also, what does the empty "DataUsageBands=" do?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Paul&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jul 2013 16:26:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-07-03T16:26:43Z</dc:date>
    <item>
      <title>Aggr() and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537759#M201005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking for a way to select a 'bucket' in "Data Use Breakdown" (0 KB, for instance - these buckets were created at load time based on data use for each phone number, and the number on the data point represent # of phone lines that fall in that bucket), see the phone numbers updated in "Data Detail by User", but then (here's the tricky part) make "Data Use by Month" update to show the data used over the months available based on the &lt;EM&gt;phone numbers &lt;/EM&gt;that have ever had 0KB usage. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What "Data Use by Month" does right now is sum total usage based on what is selected. Therefore, if I select the "0KB" bucket, it shows a flatline at 0KB. I want to select the "0KB" bucket and have "Data Use by Month" sum the usage over the past 3 months for thos phone numbers that have 0KB usage (probably not a flat line at 0KB). I'm thinking I need some sort of set anaylsis where I use aggr() like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(SUM(DataUsageKB), DataUsageBands)&amp;nbsp; ---&amp;gt; [DataUsageBands is the dimension on the graph, "Data Usage Breakdown"]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm not sure exactly how it would look. I know this explanation is a bit tough to follow, so please ask clarification quesitons if needed!&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="43558" class="jive-image-thumbnail jive-image" height="175" onclick="" alt="Capture.PNG" src="https://community.qlik.com/legacyfs/online/43558_Capture.PNG" style="height: 175px; width: 757.2115384615385px;" width="757" /&gt;&lt;IMG __jive_id="43572" class="jive-image-thumbnail jive-image" onclick="" alt="Capture1.PNG" src="https://community.qlik.com/legacyfs/online/43572_Capture1.PNG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 15:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537759#M201005</guid>
      <dc:creator />
      <dc:date>2013-07-03T15:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537760#M201006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look into the p() function in a set analysis field modifier:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3&gt;Set Modifiers with Implicit Field Value Definitions&lt;/H3&gt;&lt;P&gt;In the above examples, all field values have been explicitly defined or defined through searches. There is however an additional way to define a set of field values by the use of a nested set definition. &lt;/P&gt;&lt;P&gt;In such cases, the element functions P() and E() must be used, representing the element set of possible values and the excluded values of a field, respectively. Inside the brackets, it is possible to specify one set expression and one field, e.g. P({1} Customer). These functions cannot be used in other expressions:&lt;/P&gt;&lt;P class="example"&gt;&lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Customer = P({1&amp;lt;Product={‘Shoe’}&amp;gt;} Customer)&amp;gt;} Sales &lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;returns the sales for current selection, but only those customers that ever have bought the product ‘Shoe’. The element function P( ) here returns a list of possible customers; those that are implied by the selection ‘Shoe’ in the field Product. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Customer = P({1&amp;lt;Product={‘Shoe’}&amp;gt;})&amp;gt;} Sales &lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;same as above. If the field in the element function is omitted, the function will return the possible values of the field specified in the outer assignment. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Customer = P({1&amp;lt;Product={‘Shoe’}&amp;gt;} Supplier)&amp;gt;} Sales &lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;returns the sales for current selection, but only those customers that ever have supplied the product ‘Shoe’. The element function P( ) here returns a list of possible suppliers; those that are implied by the selection ‘Shoe’ in the field Product. The list of suppliers is then used as a selection in the field Customer. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;sum(&lt;/SPAN&gt; {$&amp;lt;Customer = E({1&amp;lt;Product={‘Shoe’}&amp;gt;})&amp;gt;} Sales &lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;returns the sales for current selection, but only those customers that never bought the product ‘Shoe’. The element function E( ) here returns the list of excluded customers; those that are excluded by the selection ‘Shoe’ in the field Product. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your expression for data use by month might look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;PhoneNumber = p({&amp;lt;DataUsageBands = {0}&amp;gt;}), DataUsageBands= &amp;gt;} DataUsageKB)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 16:08:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537760#M201006</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-03T16:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537761#M201007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is awesome! I wasn't familiar with the P() and E() functions. Is it possible to use GetFieldSelections() in this set analysis expression? Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;=sum({&amp;lt;PhoneNumber = P({&amp;lt;DataUsageBands = {"=GetFieldSelections(DataUsageBands)"}&amp;gt;}), DataUsageBands= &amp;gt;} DataUsageKB)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Not sure if that syntax is correct. Also, what does the empty "DataUsageBands=" do?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Paul&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 16:26:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537761#M201007</guid>
      <dc:creator />
      <dc:date>2013-07-03T16:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537762#M201008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just try this to keep the PhoneNumber sensitiv to user selections:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;=sum({&amp;lt;PhoneNumber = P(), DataUsageBands= &amp;gt;} DataUsageKB)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The DataUsageBands= ignores user selection in this field, otherwise you will still limit your record set to the selected DataUsage.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 16:39:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537762#M201008</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-03T16:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537763#M201009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YESS!! She works like a charm. Thanks very much for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 16:58:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-Set-Analysis/m-p/537763#M201009</guid>
      <dc:creator />
      <dc:date>2013-07-03T16:58:48Z</dc:date>
    </item>
  </channel>
</rss>

