<?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 if() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-and-if/m-p/1234398#M857418</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try This,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;valuelist&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Top','Rest')='Top',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&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: #0000ff; font-size: 8pt;"&gt;Rank&lt;/SPAN&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: #800000; font-size: 8pt;"&gt;[Invoice Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Customer Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;lt;=5,sum(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Customer Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;BR /&gt; IF( aggr ( Rank(sum(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Customer Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;5, sum(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Customer Name]&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt;)))&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;pls correct the syntax if i am wrong&amp;nbsp;&amp;nbsp; else could u pls share your application&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2017 10:09:41 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-02-08T10:09:41Z</dc:date>
    <item>
      <title>Aggr() and if()</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-if/m-p/1234396#M857416</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;I am trying to build a bar chart with defined dimensions. The dimensions are defined by =&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;valuelist('Top','Rest') &lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;, and the measures should be presented as the sum of Invoice Amounts of top 5 performers and sum of Invoice Amounts of the rest.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I tried to define this as the script shown below. For the 'Top' part I am getting a correct value, but the second part is showing empty.&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;if( valuelist('Top','Rest')='Top',&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;sum(aggr(&amp;nbsp; IF( aggr ( Rank(sum([Invoice Amount])),[Customer Name])&amp;lt;=5, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;sum([Invoice Amount])),[Customer Name])),&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;sum(aggr(&amp;nbsp; IF( aggr ( Rank(sum([Invoice Amount])),[Customer Name])&amp;gt;5, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif;"&gt;sum([Invoice Amount] )),[Customer Name]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Could anyone help me out with how to follow from here on?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Edil&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&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-and-if/m-p/1234396#M857416</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() and if()</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-if/m-p/1234397#M857417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.naturalsynergies.com/q-tip-14-aggr-and-synthetic-dimensions/" title="http://www.naturalsynergies.com/q-tip-14-aggr-and-synthetic-dimensions/"&gt;Q-Tip # 14 – AGGR() and Synthetic Dimensions | Natural Synergies&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 10:08:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-if/m-p/1234397#M857417</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-08T10:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() and if()</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-if/m-p/1234398#M857418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try This,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;valuelist&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Top','Rest')='Top',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&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: #0000ff; font-size: 8pt;"&gt;Rank&lt;/SPAN&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: #800000; font-size: 8pt;"&gt;[Invoice Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Customer Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;lt;=5,sum(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Customer Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;BR /&gt; IF( aggr ( Rank(sum(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Customer Name]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;5, sum(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Customer Name]&lt;/SPAN&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 8pt;"&gt;)))&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;pls correct the syntax if i am wrong&amp;nbsp;&amp;nbsp; else could u pls share your application&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 10:09:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-if/m-p/1234398#M857418</guid>
      <dc:creator />
      <dc:date>2017-02-08T10:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr() and if()</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-and-if/m-p/1234399#M857419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny T,&lt;/P&gt;&lt;P&gt;So instead of using a Synthetic Dimension (i.e =valuelist('Top','Rest')), which turned out to be tricky to work together with when using Aggr() function, I chose a simpler way. Which is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension:&lt;/P&gt;&lt;P&gt;if( aggr ( Rank(sum([Invoice Amount])),[Customer Name])&amp;lt;=5,&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;'Top', 'Rest');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Measure:&lt;/P&gt;&lt;P&gt;sum([Invoice Amount])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This easily does the thing I need.&lt;/P&gt;&lt;P&gt;I think I just overthought the difficulty of the project.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2017 11:21:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-and-if/m-p/1234399#M857419</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-08T11:21:24Z</dc:date>
    </item>
  </channel>
</rss>

