<?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: Strange Sum-result in Qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Strange-Sum-result-in-Qlikview/m-p/892799#M470901</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;Use AGGR()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try below&lt;/P&gt;&lt;P&gt;Sum(AGGR(sum({$&amp;lt;Shipmentdate={'&amp;lt;=$(=vYesterdayLastYear)'},MTD_BusinessDay={'&amp;lt;&amp;gt;0'}&amp;gt;} SHP),shipmentdate,MTD_BussinessDay))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Aggr() write your dimension of chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Apr 2015 09:17:14 GMT</pubDate>
    <dc:creator>PrashantSangle</dc:creator>
    <dc:date>2015-04-23T09:17:14Z</dc:date>
    <item>
      <title>Strange Sum-result in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-Sum-result-in-Qlikview/m-p/892798#M470900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikviewers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am encountering a issue where I don't understand why Qlikview applies the logic that it does.&lt;/P&gt;&lt;P&gt;Let me explain below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a database with two tables (simplified example below):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="74" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 1px solid #000000; width: 346px; height: 75px;" width="344"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;BusinessDay&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Shipmentdate&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Shipmentdate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Shipments&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;MTD_BusinessDay&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After loading, I make a straight table, which ends up like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2015-04-23_110052.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/84394_2015-04-23_110052.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;We see the Shipmentdate from both tables as the key, the MTD_BusinessDay from the right table and the SHP from the left.&lt;/P&gt;&lt;P&gt;So far, so good. However, when you manually add up the figures, you come to 1.239.298 instead of the 1.112.575 Qlikview shows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found out what happens: in the table, you can see that MTD_BusinessDay 8 and 13 both have 14-4-2014 as Shipmentdate.&lt;/P&gt;&lt;P&gt;This is intentional, so this is exactly like it's supposed to be. However, Qlikview now only adds ONE of the two in the SHP-total.&lt;/P&gt;&lt;P&gt;The formula used for the SHP is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;=sum({$&amp;lt;Shipmentdate={'&amp;lt;=$(=vYesterdayLastYear)'},MTD_BusinessDay={'&amp;lt;&amp;gt;0'}&amp;gt;} SHP)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where vYesterdayLastYear = 23-4-2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question now is: why does Qlikview only add the SHP once when calculating the total?&lt;/P&gt;&lt;P&gt;And: is there a way to force Qlikview to make the right sum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 09:07:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-Sum-result-in-Qlikview/m-p/892798#M470900</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-23T09:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Sum-result in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-Sum-result-in-Qlikview/m-p/892799#M470901</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;Use AGGR()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try below&lt;/P&gt;&lt;P&gt;Sum(AGGR(sum({$&amp;lt;Shipmentdate={'&amp;lt;=$(=vYesterdayLastYear)'},MTD_BusinessDay={'&amp;lt;&amp;gt;0'}&amp;gt;} SHP),shipmentdate,MTD_BussinessDay))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Aggr() write your dimension of chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 09:17:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-Sum-result-in-Qlikview/m-p/892799#M470901</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-04-23T09:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Sum-result in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-Sum-result-in-Qlikview/m-p/892800#M470902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like a charm! Can't believe I have been searching for 30 minutes and didn't think of this... Thansk a lot Max!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 09:20:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-Sum-result-in-Qlikview/m-p/892800#M470902</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-23T09:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Sum-result in Qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/Strange-Sum-result-in-Qlikview/m-p/892801#M470903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;You Welcome&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2015 09:32:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Strange-Sum-result-in-Qlikview/m-p/892801#M470903</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-04-23T09:32:08Z</dc:date>
    </item>
  </channel>
</rss>

