<?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: WEIRD SUM FUNCTION RESULTS in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971830#M963651</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please Close the thread as answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Oct 2015 16:24:45 GMT</pubDate>
    <dc:creator>Qrishna</dc:creator>
    <dc:date>2015-10-15T16:24:45Z</dc:date>
    <item>
      <title>WEIRD SUM FUNCTION RESULTS</title>
      <link>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971825#M963646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to add up my usage costs in Qlikview&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have orders: each order has part#s on it. I am trying to add up my total usage by month of each part # and the total cost&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have three expressions. &lt;/P&gt;&lt;P&gt;1. Usage&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = OrderShippedQty&lt;/P&gt;&lt;P&gt;2. Average Cost = Avg_Cost&lt;/P&gt;&lt;P&gt;3. TotalCost = Sum(OrderShippedQty*Avg_Cost)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what is weird: the SUM function screws it up.&lt;/P&gt;&lt;P&gt;When I don't put in the Sum function (like this)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikView Image 05.PNG" class="jive-image image-1" src="/legacyfs/online/101927_QlikView Image 05.PNG" style="height: 231px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this - perfect 4,487 units at $1 each is a total cost of $4,487&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikView Image 06.PNG" class="jive-image image-2" src="/legacyfs/online/101928_QlikView Image 06.PNG" style="height: 54px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SUM function shouldn't change anything - this is right down to the single order level.&lt;/P&gt;&lt;P&gt;But when i put in the SUM function it jumps to $94,227 WHY? &lt;IMG alt="QlikView Image 07.PNG" class="jive-image image-3" src="/legacyfs/online/101929_QlikView Image 07.PNG" style="height: 240px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikView Image 08.PNG" class="image-4 jive-image" src="/legacyfs/online/101930_QlikView Image 08.PNG" style="height: 54px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 17:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971825#M963646</guid>
      <dc:creator />
      <dc:date>2015-10-13T17:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: WEIRD SUM FUNCTION RESULTS</title>
      <link>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971826#M963647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without the Sum() function the expression defaults to Only(), which will only display value if all rows have the same value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are getting exactly 23 times than you should with Sum(), which indicates you have 23 rows the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens if you use the Count() function instead ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I reckon you'll get a count of 23, as in you have 23 rows the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 17:32:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971826#M963647</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-13T17:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: WEIRD SUM FUNCTION RESULTS</title>
      <link>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971827#M963648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(OrderShippedQty*Avg_Cost),ProductID&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually in your type scenarios where there multiple products and the user is looking for only product's, the summation needs aggregations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would you mind sharing some demo data.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2015 17:50:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971827#M963648</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2015-10-13T17:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: WEIRD SUM FUNCTION RESULTS</title>
      <link>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971828#M963649</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;Aggr function should resolve this issue as suggested by krishna,&lt;/P&gt;&lt;P&gt;or you should add in dimension a key filed to differentiate the part# and remove the duplicate 21 rows which give the wrong answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 07:40:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971828#M963649</guid>
      <dc:creator />
      <dc:date>2015-10-14T07:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: WEIRD SUM FUNCTION RESULTS</title>
      <link>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971829#M963650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! That did it! THank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 15:41:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971829#M963650</guid>
      <dc:creator />
      <dc:date>2015-10-15T15:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: WEIRD SUM FUNCTION RESULTS</title>
      <link>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971830#M963651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please Close the thread as answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2015 16:24:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/WEIRD-SUM-FUNCTION-RESULTS/m-p/971830#M963651</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2015-10-15T16:24:45Z</dc:date>
    </item>
  </channel>
</rss>

