<?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: Syntax - Sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Syntax-Sum/m-p/472532#M485149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if Item Number is not one of the Dimension in ur chart then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(sum ([List Price (SEK)] /[BaselistPrice(SEK)] ), [Item number])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that u dnt need Qty in both the Numerator and Denominator as they will cancel out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Item Number is a dimension, then you can simply do sum([List Price (SEK)] /[BaselistPrice(SEK)] )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 May 2013 17:42:01 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-18T17:42:01Z</dc:date>
    <item>
      <title>Syntax - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-Sum/m-p/472531#M485148</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;Syntax errors, any ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;trying to calculate sum on field Item Number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum (([List Price (SEK)] * Qty) /([BaselistPrice(SEK)] * Qty) , [Item number]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Bradley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 May 2013 17:22:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-Sum/m-p/472531#M485148</guid>
      <dc:creator />
      <dc:date>2013-05-18T17:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-Sum/m-p/472532#M485149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if Item Number is not one of the Dimension in ur chart then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(sum ([List Price (SEK)] /[BaselistPrice(SEK)] ), [Item number])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that u dnt need Qty in both the Numerator and Denominator as they will cancel out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Item Number is a dimension, then you can simply do sum([List Price (SEK)] /[BaselistPrice(SEK)] )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 May 2013 17:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-Sum/m-p/472532#M485149</guid>
      <dc:creator />
      <dc:date>2013-05-18T17:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-Sum/m-p/472533#M485150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tip&lt;/P&gt;&lt;P&gt;Hi i have attached a picture below of the problem i am facing, I can work out the first varians in the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;([List Price (SEK)]&amp;nbsp; - [BaselistPrice(SEK)] / BaselistPrice(SEK)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however am looking an expression that can even work when Article number is not shown and you pivot down through other dimensions like Year varians and Customer (see below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="41296" class="jive-image-thumbnail jive-image" onclick="" alt="Problem.jpg" src="https://community.qlik.com/legacyfs/online/41296_Problem.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Bradley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 May 2013 18:10:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-Sum/m-p/472533#M485150</guid>
      <dc:creator />
      <dc:date>2013-05-18T18:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Syntax-Sum/m-p/472534#M485151</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;i see that u're getting the sums right except for the BaseList(SEK) due to null values.&lt;/P&gt;&lt;P&gt;There're quite a few methods to solve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best is to do it in script for the field [BaseList(SEK)]: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(isnull([BaseList(SEK)],0,[BaseList(SEK)]) as [BaseList(SEK)] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this and let me know if u get what u need&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 May 2013 02:50:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Syntax-Sum/m-p/472534#M485151</guid>
      <dc:creator />
      <dc:date>2013-05-19T02:50:13Z</dc:date>
    </item>
  </channel>
</rss>

