<?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() expression? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104153#M898528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DAVID MALAIZIER,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have aggregated the amount -&amp;gt; country and month year wise to get what you asked. What I am providing is an idea for your requirement. See the script. Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Aug 2016 10:34:26 GMT</pubDate>
    <dc:creator>rajuamet</dc:creator>
    <dc:date>2016-08-05T10:34:26Z</dc:date>
    <item>
      <title>Aggr() expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104145#M898520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I'm missing something with the aggr() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;To explain it shortly, I want to compare the amount of sales done by each salesman in each country with the amount of sales done in each country by all salesmen. (by month, year and past 12 months).&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I also wish that any selection (despite MonthYear) won't alter the result of the &lt;SPAN style="font-size: 13.3333330154419px;"&gt;"€ Month (all Salesmen)" &lt;SPAN style="font-size: 13.3333330154419px;"&gt;column.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In the app joined, I wish I could have the same values from "COUNTRY' pivot table &lt;/P&gt;&lt;P&gt;in the "€ Month (all Salesmen)" column of the "SALES by Country" pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for any help provided.&lt;/P&gt;&lt;P&gt;David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104145#M898520</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104146#M898521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Isn't that what you already have? I am not sure what is missing here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/133191_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 15:35:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104146#M898521</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-01T15:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104147#M898522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a very long explanation for the reasons why you don't need an AGGR() function in this case, and how to make it work properly. If you even make it to the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik&lt;/A&gt;, you can listen to my 4-hour lecture that covers that, among other advanced AGGR() and Set Analysis issues. If you can't make it to the Masters Summit, you can read about it in my book &lt;A href="http://www.amazon.com/gp/product/1118949552/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1118949552&amp;amp;linkCode=as2&amp;amp;tag=natursyner0f-20&amp;amp;linkId=CVZRHMG6CVR2FGTA"&gt;QlikView Your Business&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The short version is this (you'll have to take my work for it though):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. No need to use AGGR() - a simple sum(TOTAL&amp;lt;Country&amp;gt; Amount) with the same Set Analysis condition&amp;nbsp; will do the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. You don't see exactly the same numbers because of your calculated Dimensions - if you clear the box "Suppress when Value is Null", you will see that some of the amounts are attributed to Country=NULL. That happens when one of your nested IF conditions (by the way, really-really bad for performance) render FALSE. I'd recommend to remove the IF conditions and achieve the same effect in a different way. I wasn't sure what exactly is it supposed to do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;Upgrade your Qlik skills at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik&lt;/A&gt; - coming soon to Austin, Texas and Johannesburg, South Africa!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 15:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104147#M898522</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-08-01T15:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104148#M898523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, bad copy/paste.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course the values are here, but I wish them not to depend on any salesman man selection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 15:43:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104148#M898523</guid>
      <dc:creator />
      <dc:date>2016-08-01T15:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104149#M898524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish I could join the summit but it won't be possible.&lt;/P&gt;&lt;P&gt;Plus, I don't think I have enough skills in both english and Qlik to attend it. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I can obtain these result without Aggr() but I don't see another way not to be dependant of any selection on the Salesman field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 15:52:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104149#M898524</guid>
      <dc:creator />
      <dc:date>2016-08-01T15:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104150#M898525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once you use {1} in your Set Analysis , you disregard any selections. Alternatively, you can use the following to disregard just the selection of Salesman:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{$&amp;lt;Salesman=&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AGGR() doesn't add any extra value in terms of disregarding the selection of a Salesman.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 16:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104150#M898525</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-08-01T16:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104151#M898526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok I think I'm trying to achieve something not possible the way I tried it or I haven't been clear enough sorry.&lt;/P&gt;&lt;P&gt;So let's ask the question differently, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the beginning :&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) I want to compare, for a selected MonthYear, the amount of sales done by each salesman in each country with the amount of sales done in each country by all salesmen. (by month, year and past 12 months).&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) also, that any selection (despite MonthYear) won't alter the result of the &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;"€ Month (all Salesmen)" &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;column.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3) and, to hide other Salesmen &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;rows &lt;/SPAN&gt;when one (or more) is selected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So this is the pivot table (with no calculated dimensions) :&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Two dimensions : Salesman, Country&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Three Expressions :&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - € Month&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : =sum({&amp;lt;MonthYear={'$(=Only(MonthYear))'}&amp;gt;} Amount)&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - € Month (AllS) : =sum(TOTAL &amp;lt;Country&amp;gt; {$&amp;lt;Salesman=, MonthYear={'$(=Only(MonthYear))'}&amp;gt;} Amount)&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - AGGR : =sum(TOTAL &amp;lt;Country&amp;gt; {1&amp;lt;MonthYear={'$(=Only(MonthYear))'}&amp;gt;} aggr(sum(TOTAL &amp;lt;Country&amp;gt; {1&amp;lt;MonthYear={'$(=Only(MonthYear))'}&amp;gt;} Amount), Country))&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;IMG alt="Wanted.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/133273_Wanted.PNG" style="height: 286px; width: 620px;" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;At that point I wish to keep these expression values despite dimensions are reduced or not like here :&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;IMG alt="problem_1.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/133280_problem_1.PNG" style="height: 232px; width: 620px;" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;And, if a salesman is selected, to hide the other ones :&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;IMG alt="problem_2.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/133281_problem_2.PNG" style="height: 263px; width: 620px;" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Is this even possible?&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2016 07:45:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104151#M898526</guid>
      <dc:creator />
      <dc:date>2016-08-02T07:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104152#M898527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it's certainly possible. I just don't have as much time to delve into all the details of this calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can find some hints to the solution in this blog article:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.naturalsynergies.com/q-tip-8-ranking-the-unrankable/" style="font-size: 10pt; line-height: 1.5em;" title="http://www.naturalsynergies.com/q-tip-8-ranking-the-unrankable/"&gt;http://www.naturalsynergies.com/q-tip-8-ranking-the-unrankable/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2016 20:14:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104152#M898527</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2016-08-04T20:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104153#M898528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DAVID MALAIZIER,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have aggregated the amount -&amp;gt; country and month year wise to get what you asked. What I am providing is an idea for your requirement. See the script. Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 10:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-expression/m-p/1104153#M898528</guid>
      <dc:creator>rajuamet</dc:creator>
      <dc:date>2016-08-05T10:34:26Z</dc:date>
    </item>
  </channel>
</rss>

