<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364091#M135462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Couldn't this situation have also been solved by using the product name as the earliest dimesion, i.e. =aggr(sum(Metric), Product, Country, Month) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jun 2012 17:53:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-11T17:53:28Z</dc:date>
    <item>
      <title>Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364082#M135453</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;I did a formula =aggr(sum(Metric),Country, Month) and I would like display it by product. &lt;/P&gt;&lt;P&gt;do you know why, it's working for the first product, but I cannot repeat values for all of them?&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Eva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 18:00:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364082#M135453</guid>
      <dc:creator />
      <dc:date>2012-05-22T18:00:56Z</dc:date>
    </item>
    <item>
      <title>Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364083#M135454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you describe your data model a bit more, best by uploading a small sample?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not completely sure about your setting, but have you tried adding the NODISTINCT qualifier to the aggr() function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=aggr( NODISTINCT sum(Metric),Country, Month)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 18:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364083#M135454</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-22T18:19:55Z</dc:date>
    </item>
    <item>
      <title>Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364084#M135455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; No disctinct works perfectly !!! thanks a lot. I looks like a magician !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 18:22:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364084#M135455</guid>
      <dc:creator />
      <dc:date>2012-05-22T18:22:49Z</dc:date>
    </item>
    <item>
      <title>Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364085#M135456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you need product, you probably have to add it to the dimensions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt; =aggr(sum(Metric),Country, Month, Product)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 18:23:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364085#M135456</guid>
      <dc:creator>danielrozental</dc:creator>
      <dc:date>2012-05-22T18:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364086#M135457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/swuehl" id="jive-1582326201888835622012"&gt;swuehl&lt;/A&gt; / Stefan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt; I'm very curious to understand on how did you predict/guess that missing NoDistinct qualifier was the issue in the above expression and without even looking at the dataset? Please can you explain more about NoDistinct Qualifier using in conjuction with Aggr()?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Thanks in advance and I'll look forward to hear from you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;DV&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 10:46:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364086#M135457</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2012-05-23T10:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364087#M135458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whenever I read something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;..it's working for the first product, but I cannot repeat values for all of them...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's the symptom if aggr() is used just with it's implicite DISTINCT qualifier on multiple occurences of identical dimension combinations (talking about the aggr() dimensions here). I just guessed that this was the case in Eva's setting (and indeed, in her other thread I discovered shortly after, you can see the data and the context of the function in her table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still found it a bit strange that Qliktech uses an implicite DISTINCT qualifier with aggr(), but not with count() etc, which I think causes a lot of confusion for the users (ahm, I don't want to suggest a default DISTINCT qualifier for count(), just pointing the difference!). In fact, I think this type of issue is among the Top5 I have answered in this forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using the NODISTINCT, you can most of the time work with a TOTAL&amp;lt;FIELDS&amp;gt; within an aggregation, I think&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=aggr( sum(total&amp;lt;Country,Month&amp;gt; Metric), Country, Month, Product) &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will be equivalent in Eva's setting. But I would assume that NODISTINCT should be more performant for QV to calculate (and also a bit shorter to read).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 11:25:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364087#M135458</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-23T11:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364088#M135459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Stefan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Excellent stuff and it totally makes sense. Thank you very much for detailed explanation. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;I would expect &lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;&lt;STRONG&gt;Concat()&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt; function to behave as &lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;&lt;STRONG&gt;Aggr()&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt; function. I mean, I would like to think that &lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;&lt;STRONG&gt;Concat()&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt; function should return distinct values by default unless we use NODISTINCT qualifier. Again, I might be wrong but that's just my understanding. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;And I understand that &lt;EM style="color: #000080;"&gt;&lt;STRONG&gt;FirstSortedValue()&lt;/STRONG&gt;&lt;/EM&gt; function allows us to use DISTINCT qualifier but it has no meaning. I'm not sure using if there is performance again by using DISTINCT qualifier in &lt;SPAN style="color: #000080;"&gt;&lt;EM&gt;&lt;STRONG&gt;FirstSortedValue()&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt; function?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Anyway, I'll get used to all this stuff and learn more. But I really appreciate all your help and time. Please let me know whenever you are in London. I'd love to catch up.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;DV&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 15:44:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364088#M135459</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2012-05-23T15:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364089#M135460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I think I agree with the concat() function. Default DISTINCT qualifier would be appropriate, I believe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the FirstSortedValue(), I believe there is in fact a setting where the DISTINCT is applicable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When your sort weight [btw, the Helps says it's optional, but I can't get it see a use for FirstSortedValue without giving the sort argument?] shows duplicate values at the requested sort order, FirstSortedValue() will by default return NULL because the answer is ambiguous, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using DISTINCT, you can force QV to return a value, it will take the value with the lowest load order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort, Value&lt;/P&gt;&lt;P&gt;1, 1&lt;/P&gt;&lt;P&gt;1, 2&lt;/P&gt;&lt;P&gt;2, 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=FirstSortedValue(&amp;nbsp;&amp;nbsp; Value, Sort)&lt;/EM&gt; will return NULL&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=FirstSortedValue( distinct&amp;nbsp; Value, Sort) &lt;/EM&gt;will return 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, but I have another nice one: What is the use for DISTINCT in &lt;STRONG&gt;only() &lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am referring to the HELP version I am using here (QV11, english). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 16:26:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364089#M135460</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-23T16:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364090#M135461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Stefan - This is awesome explanation. I like your clarity of thought. I always used to wonder - how to use FirstSortedValue() with duplicate values. This makes complete sense and you are right, QlikView Reference Guide states that Sort Weight is optional but it doesn't work without Sort Weight field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;I agree with you on Only() function which is classic example which accepts Distinct qualifier without any practical use.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Thanks again for your time and detailed explanation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Have a good day.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri,verdana,arial,sans-serif;"&gt;DV&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 14:49:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364090#M135461</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2012-05-24T14:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364091#M135462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Couldn't this situation have also been solved by using the product name as the earliest dimesion, i.e. =aggr(sum(Metric), Product, Country, Month) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 17:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364091#M135462</guid>
      <dc:creator />
      <dc:date>2012-06-11T17:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/364092#M135463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great discussion! I am facing the same problem.&lt;/P&gt;&lt;P&gt;When using &lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;=aggr( NODISTINCT sum(Metric),Dim1, Dim2) &lt;/EM&gt;&lt;/SPAN&gt;how to display the total in a straight table?&lt;/P&gt;&lt;P&gt;When using&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt; Expression Total &lt;/EM&gt;&lt;/SPAN&gt;it will give us the sum of the nodistinct what is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how can it be achieved to get the aggregation values repeated&lt;SPAN style="font-size: 13.3333px;"&gt; (nodistinct) &lt;/SPAN&gt;inside the table, and a (distinct) total sum above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2015 11:42:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/364092#M135463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-29T11:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr/m-p/2098431#M1224294</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;you can use Total &amp;lt;Group by Fields&amp;gt; in sum function instead of Aggr too.&lt;/P&gt;
&lt;P&gt;like this :&lt;/P&gt;
&lt;P&gt;=SUM(Total&amp;lt;Country,Month&amp;gt; Metric)&lt;/P&gt;
&lt;P&gt;Have good Day&lt;/P&gt;
&lt;P&gt;Saray&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jul 2023 06:10:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr/m-p/2098431#M1224294</guid>
      <dc:creator>saray_JD</dc:creator>
      <dc:date>2023-07-30T06:10:59Z</dc:date>
    </item>
  </channel>
</rss>

