<?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: Aggre function with sum and without sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304054#M406082</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aggr() returns an n-dimensional matrix or hypercube (where n is the number of dimensions supplied) - evaluating the inner expression over each cell in the hypercube. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first case, SALES will be set to null if there is more than one possible value for any combination of SALESPERSON/PRODUCT. The inner expression is =SALES which QV treats as =Only(SALES).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second expression will sum the values, so it returns a value for every cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect that your first dataset has only one possible value of SALES for each combination of the dimensions and your second dataset has more than one possible value for one or more combinations of the dimensions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Apr 2017 07:39:37 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2017-04-12T07:39:37Z</dc:date>
    <item>
      <title>Aggre function with sum and without sum</title>
      <link>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304053#M406081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SALES&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SALESPERSON&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PRODUCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SUM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(SUM(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SALES)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SALESPERSON&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PRODUCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/SPAN&gt;&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;Can I ask what is the difference between the first function and second function. On one dataset, both functions give me the same result. On another dataset, both functions give me a different result. There is a difference but can someone explain to me in simple words? thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 07:08:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304053#M406081</guid>
      <dc:creator />
      <dc:date>2017-04-12T07:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Aggre function with sum and without sum</title>
      <link>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304054#M406082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aggr() returns an n-dimensional matrix or hypercube (where n is the number of dimensions supplied) - evaluating the inner expression over each cell in the hypercube. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first case, SALES will be set to null if there is more than one possible value for any combination of SALESPERSON/PRODUCT. The inner expression is =SALES which QV treats as =Only(SALES).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second expression will sum the values, so it returns a value for every cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect that your first dataset has only one possible value of SALES for each combination of the dimensions and your second dataset has more than one possible value for one or more combinations of the dimensions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 07:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304054#M406082</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-04-12T07:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Aggre function with sum and without sum</title>
      <link>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304055#M406083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sir, thanks for your explanation. What about &lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SALES&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SALESPERSON&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PRODUCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 07:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304055#M406083</guid>
      <dc:creator />
      <dc:date>2017-04-12T07:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Aggre function with sum and without sum</title>
      <link>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304056#M406084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the difference&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/159827_Capture.JPG" style="height: 184px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First expression will not be evaluated when there is two lines for combination of Salesperson and product, because as explained by Jonathan , your first expression is nothing but =SUM(aggr(&lt;STRONG&gt;only(Sales)&lt;/STRONG&gt;, SalesPerson, Product)). So when there is a two lines for c&lt;SPAN style="font-size: 13.3333px;"&gt;ombination of Salesperson and product&lt;/SPAN&gt; it will return NULL, due to outer aggregation Sum(NULL) will become 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where your second expression simply performing Sum(Sales) for each combination &lt;SPAN style="font-size: 13.3333px;"&gt;of Salesperson and product&lt;/SPAN&gt;,because you are performing Sum in inner expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 08:07:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304056#M406084</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2017-04-12T08:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Aggre function with sum and without sum</title>
      <link>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304057#M406085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;What about &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;SALES&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;SALESPERSON&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PRODUCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the same as &lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;SALES&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;SALESPERSON&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;PRODUCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;). &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Parentheses won't change anything.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 09:18:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggre-function-with-sum-and-without-sum/m-p/1304057#M406085</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-04-12T09:18:10Z</dc:date>
    </item>
  </channel>
</rss>

