<?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: Clarify formula with equals Aggr ( = Aggr). in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1825049#M67779</link>
    <description>&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;Thank you Anthony, now everything is clear.&lt;/P&gt;&lt;P&gt;By your response I think that the equivalent formula would be&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum&lt;SPAN class="s1"&gt;( If(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;Aggr&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;NoDistinct Max&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Contra&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;), -1, 0))&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;But in any case I'll accpet Mayil's answer as correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;Thank you again to both!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jul 2021 06:15:43 GMT</pubDate>
    <dc:creator>Morgoz</dc:creator>
    <dc:date>2021-07-28T06:15:43Z</dc:date>
    <item>
      <title>Clarify formula with equals Aggr ( = Aggr).</title>
      <link>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1824622#M67719</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;could someone please teach me what does this measure formula does?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;-&lt;/SPAN&gt;Sum&lt;SPAN class="s1"&gt;(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;Aggr&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;NoDistinct Max&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Contra&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;The part that is getting me crazy is the "Base = Aggr". Up what I know the Aggr function returns a table, in the example above a table with all the maximum values of "Base" in "Contra", but if I remove the "Sum" and leave the measure like&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;Aggr(NoDistinct Max(&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;),&amp;nbsp;&lt;SPAN class="s2"&gt;Contra&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;It shows minus the number of maximum values that are equal per "Contra" dimension...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;For more information, it comes from a solved post of mine:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/App-Development/Get-number-of-times-a-maximum-value-occurs-on-a-dimension/m-p/1824317#M67672" target="_blank" rel="noopener"&gt;post&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;Need clarification please!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 21:34:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1824622#M67719</guid>
      <dc:creator>Morgoz</dc:creator>
      <dc:date>2021-07-26T21:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Clarify formula with equals Aggr ( = Aggr).</title>
      <link>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1824653#M67725</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its short form of below&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum&lt;SPAN class="s1"&gt;( If(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;Aggr&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;NoDistinct Max&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Contra&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;), 1, 0))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;Ur dimension is&amp;nbsp;&lt;SPAN&gt;Contra&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;So, its check the base = max(base) for that contra, if its yes, gives 1 else 0.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;---------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;Aggr(NoDistinct Max(&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;),&amp;nbsp;&lt;SPAN class="s2"&gt;Contra&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;It shows minus the number of maximum values that are equal per "Contra" dimension...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;Yes, its gives minus, that the reason, "minus" is added before sum() &amp;amp; gives the correct result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;&lt;U&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/U&gt;Sum(&amp;nbsp;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;Aggr(NoDistinct Max(&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;),&amp;nbsp;&lt;SPAN class="s2"&gt;Contra&lt;/SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 04:23:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1824653#M67725</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2021-07-27T04:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Clarify formula with equals Aggr ( = Aggr).</title>
      <link>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1824989#M67771</link>
      <description>&lt;P&gt;Thank you Mayil,&lt;/P&gt;&lt;P&gt;now just tell me please, why does it returns "minus"? From your response, the formula is an abreviation of&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum&lt;SPAN class="s1"&gt;( If(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;Aggr&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;NoDistinct Max&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Contra&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;), 1, 0))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And I don't see any minus in that formula... Base is always a positive number. Wouldn't it be&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum&lt;SPAN class="s1"&gt;( If(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;Aggr&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;NoDistinct Max&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Contra&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;), -1, 0)) ?&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;But in any case why with minus?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 21:46:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1824989#M67771</guid>
      <dc:creator>Morgoz</dc:creator>
      <dc:date>2021-07-27T21:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Clarify formula with equals Aggr ( = Aggr).</title>
      <link>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1825008#M67773</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The calculation is implicitly summing the TRUE and FALSE results from the "Base = Max(Base)" calculation. Qlik calculates TRUE as -1 and FALSE as 0. This is why you end up with a negative number. To get around this you can wrap your calculation in the ABS( ) function or just multiply by -1.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 01:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1825008#M67773</guid>
      <dc:creator>anthonyj</dc:creator>
      <dc:date>2021-07-28T01:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Clarify formula with equals Aggr ( = Aggr).</title>
      <link>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1825049#M67779</link>
      <description>&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;Thank you Anthony, now everything is clear.&lt;/P&gt;&lt;P&gt;By your response I think that the equivalent formula would be&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum&lt;SPAN class="s1"&gt;( If(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;Aggr&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;NoDistinct Max&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Base&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Contra&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;), -1, 0))&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;But in any case I'll accpet Mayil's answer as correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="s1"&gt;Thank you again to both!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 06:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Clarify-formula-with-equals-Aggr-Aggr/m-p/1825049#M67779</guid>
      <dc:creator>Morgoz</dc:creator>
      <dc:date>2021-07-28T06:15:43Z</dc:date>
    </item>
  </channel>
</rss>

