<?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 Please sum up the given set analysis expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Please-sum-up-the-given-set-analysis-expression/m-p/221083#M73924</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;Can anyone let me know how to sum up the below expression:&lt;/P&gt;&lt;P&gt;if (sum({&amp;lt;status={Current}&amp;gt;} if(Store_fiscal='0099' or Store_Retail='0099' or noncomp_fiscal='0099' or noncomp_retail='0099','0', if(Coupon_Flag='Y' and ACCT='MHOODC' or 'QOP.C' ,aggr(sum(Sold_At*Qty*CONV_RATE),Order_Key)-Coupon_Dollars,&lt;BR /&gt; if(Coupon_Flag='Y' and ACCT&amp;lt;&amp;gt;'MHOODC' or 'QOP.C' ,aggr(sum(Sold_At*Qty),Order_Key)-Coupon_Dollars,&lt;BR /&gt; if(Coupon_Flag&amp;lt;&amp;gt;'Y' and ACCT='MHOODC' or 'QOP.C' ,(Sold_At*Qty*CONV_RATE),&lt;BR /&gt;(Sold_At*Qty))))))=0,-sum({&amp;lt;status={Previous}&amp;gt;} if(Store_fiscal='0099' or Store_Retail='0099' or noncomp_fiscal='0099' or noncomp_retail='0099','0', if(Coupon_Flag='Y' and ACCT='MHOODC' or 'QOP.C' ,aggr(sum(Sold_At*Qty*CONV_RATE),Order_Key)-Coupon_Dollars,&lt;BR /&gt; if(Coupon_Flag='Y' and ACCT&amp;lt;&amp;gt;'MHOODC' or 'QOP.C' ,aggr(sum(Sold_At*Qty),Order_Key)-Coupon_Dollars,&lt;BR /&gt; if(Coupon_Flag&amp;lt;&amp;gt;'Y' and ACCT='MHOODC' or 'QOP.C' ,(Sold_At*Qty*CONV_RATE),&lt;BR /&gt;(Sold_At*Qty))))))).When I use a simple at the the very beginning it does not give any values at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Sep 2010 18:45:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-09-28T18:45:07Z</dc:date>
    <item>
      <title>Please sum up the given set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Please-sum-up-the-given-set-analysis-expression/m-p/221083#M73924</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;Can anyone let me know how to sum up the below expression:&lt;/P&gt;&lt;P&gt;if (sum({&amp;lt;status={Current}&amp;gt;} if(Store_fiscal='0099' or Store_Retail='0099' or noncomp_fiscal='0099' or noncomp_retail='0099','0', if(Coupon_Flag='Y' and ACCT='MHOODC' or 'QOP.C' ,aggr(sum(Sold_At*Qty*CONV_RATE),Order_Key)-Coupon_Dollars,&lt;BR /&gt; if(Coupon_Flag='Y' and ACCT&amp;lt;&amp;gt;'MHOODC' or 'QOP.C' ,aggr(sum(Sold_At*Qty),Order_Key)-Coupon_Dollars,&lt;BR /&gt; if(Coupon_Flag&amp;lt;&amp;gt;'Y' and ACCT='MHOODC' or 'QOP.C' ,(Sold_At*Qty*CONV_RATE),&lt;BR /&gt;(Sold_At*Qty))))))=0,-sum({&amp;lt;status={Previous}&amp;gt;} if(Store_fiscal='0099' or Store_Retail='0099' or noncomp_fiscal='0099' or noncomp_retail='0099','0', if(Coupon_Flag='Y' and ACCT='MHOODC' or 'QOP.C' ,aggr(sum(Sold_At*Qty*CONV_RATE),Order_Key)-Coupon_Dollars,&lt;BR /&gt; if(Coupon_Flag='Y' and ACCT&amp;lt;&amp;gt;'MHOODC' or 'QOP.C' ,aggr(sum(Sold_At*Qty),Order_Key)-Coupon_Dollars,&lt;BR /&gt; if(Coupon_Flag&amp;lt;&amp;gt;'Y' and ACCT='MHOODC' or 'QOP.C' ,(Sold_At*Qty*CONV_RATE),&lt;BR /&gt;(Sold_At*Qty))))))).When I use a simple at the the very beginning it does not give any values at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 18:45:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Please-sum-up-the-given-set-analysis-expression/m-p/221083#M73924</guid>
      <dc:creator />
      <dc:date>2010-09-28T18:45:07Z</dc:date>
    </item>
    <item>
      <title>Please sum up the given set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Please-sum-up-the-given-set-analysis-expression/m-p/221084#M73925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have aggregate functions in your expression. You can't sum this expression, because then you would have nested aggreagates [Sum(Sum(Sales))], which is not allowed.&lt;/P&gt;&lt;P&gt;You need to use the Aggr() function. The Aggr() function requires that you define the dimensions over which to aggregate.&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum(Aggr(Your long expression here, Dimension1, Dimension2))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 20:13:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Please-sum-up-the-given-set-analysis-expression/m-p/221084#M73925</guid>
      <dc:creator />
      <dc:date>2010-09-28T20:13:55Z</dc:date>
    </item>
  </channel>
</rss>

