<?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: Sum if, with nested sum expression, any ideas? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909517#M315834</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes ,&lt;/P&gt;&lt;P&gt;thats what i meant , now the aggr function is outside the if &lt;/P&gt;&lt;P&gt;and i am quite sure you can delete that you can delete the inner aggr function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2015 11:15:34 GMT</pubDate>
    <dc:creator>lironbaram</dc:creator>
    <dc:date>2015-07-22T11:15:34Z</dc:date>
    <item>
      <title>Sum if, with nested sum expression, any ideas?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909512#M315829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm having some issues with a sum(if expression which contains some nested statements, I;ve tried many variations but can't get it to work.&lt;/P&gt;&lt;P&gt;Any idaes much appreciated,&lt;/P&gt;&lt;P&gt;Expression as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Trade_90_WorkDayFlag = {1}&amp;nbsp; &amp;gt;}&lt;BR /&gt; if(aggr(sum(AnnualisedSales), [Client]) &amp;gt; vAnnSalesSlider , &lt;BR /&gt;&amp;nbsp;&amp;nbsp; (((sum(TOTAL &amp;lt;[Client Classification]&amp;gt; {$&amp;lt;Trade_90_WorkDayFlag= {1} &amp;gt;} $(eSales)))- &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (sum(TOTAL &amp;lt;[Client Classification]&amp;gt; {$&amp;lt;[Client] = ,Trade_Prev_90_WorkDayFlag= {1} &amp;gt;} $(eSales))))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /(sum(TOTAL &amp;lt;[Client Classification]&amp;gt; {$&amp;lt;[Client] = ,Trade_Prev_90_WorkDayFlag= {1} &amp;gt;} $(eSales))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if we simplify this to :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Client Parent Name] =, Trade_90_WorkDayFlag = {1}&amp;nbsp; &amp;gt;}&lt;/P&gt;&lt;P&gt; if(aggr(sum(PostJVAnnualisedRevs), [Client Parent Name]) &amp;gt; vAnnREVsSlider , &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; (((sum(TOTAL &amp;lt;[Client Classification]&amp;gt; {$&amp;lt;Trade_90_WorkDayFlag= {1} &amp;gt;} $(ePostJVCapEdge)))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot get this to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically translated it means:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If annualised sales per client is greater than the variable vAnnSalesSlider, complete the next part of the expression which gives me an average.&lt;/P&gt;&lt;P&gt;However, the sum if, with a nested sum does not work.&amp;nbsp; Any ideas to get around this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is for a chart which does not contain client within it.&amp;nbsp; It has one dimension - Client classification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brendan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 09:02:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909512#M315829</guid>
      <dc:creator />
      <dc:date>2015-07-22T09:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if, with nested sum expression, any ideas?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909513#M315830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there is a problem with your logic&lt;/P&gt;&lt;P&gt;the if statement return an array by the aggr function and the other side return one value &lt;/P&gt;&lt;P&gt;you need to close the aggr function after the whole expression&lt;/P&gt;&lt;P&gt;what is the dimension of the calculation &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 09:09:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909513#M315830</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-07-22T09:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if, with nested sum expression, any ideas?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909514#M315831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's client classification&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 09:32:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909514#M315831</guid>
      <dc:creator />
      <dc:date>2015-07-22T09:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if, with nested sum expression, any ideas?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909515#M315832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what exactly do you intend to calculate&lt;/P&gt;&lt;P&gt;the client sales vs the total sales ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 10:46:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909515#M315832</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-07-22T10:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if, with nested sum expression, any ideas?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909516#M315833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;think i may have sorted it, it is getting the client classification averages when the client sales meet the variable condition of vAnnSalesSlider over 90 days vs prev 90 days;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a bar chart with dimension as client classification this works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(sum(aggr(if(aggr(sum(AnnualisedSales), [Client]) &amp;gt; vAnnSalesSlider, &lt;BR /&gt;(sum({$&amp;lt;[Client] = ,Trade_90_WorkDayFlag= {1} &amp;gt;}$(eSales))/%Unit))&lt;BR /&gt; ,[Client]))&lt;BR /&gt; &lt;BR /&gt;-&lt;/P&gt;&lt;P&gt;sum(aggr(if(aggr(sum(AnnualisedSales), [Client Parent ID]) &amp;gt; vAnnSalesSlider, &lt;BR /&gt;(sum({$&amp;lt;[Client] = ,Trade_Prev_90_WorkDayFlag= {1} &amp;gt;}$(eSales))/%Unit))&lt;BR /&gt; ,[Client])))&lt;BR /&gt; &lt;BR /&gt; /&lt;BR /&gt; &lt;BR /&gt;sum(aggr(if(aggr(sum(AnnualisedSales), [Client Parent ID]) &amp;gt; vAnnSalesSlider, &lt;BR /&gt;(sum({$&amp;lt;[Client] = ,Trade_Prev_90_WorkDayFlag= {1} &amp;gt;}$(eSales))/%Unit))&lt;BR /&gt; ,[Client])) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 11:02:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909516#M315833</guid>
      <dc:creator />
      <dc:date>2015-07-22T11:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if, with nested sum expression, any ideas?</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909517#M315834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes ,&lt;/P&gt;&lt;P&gt;thats what i meant , now the aggr function is outside the if &lt;/P&gt;&lt;P&gt;and i am quite sure you can delete that you can delete the inner aggr function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 11:15:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-with-nested-sum-expression-any-ideas/m-p/909517#M315834</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-07-22T11:15:34Z</dc:date>
    </item>
  </channel>
</rss>

