<?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: Incorrect SUM value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272403#M623196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to me like your issue can be explained only looking at the CASES table, since both the dimension and expression field originate from that table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the primary key of that table? Is it [Case No], i.e. is there only a single record per case no?&lt;/P&gt;&lt;P&gt;Or is it [Log ID]? Or a combination of fields?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to add the primary key to your straight table as dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way to investigate could be to check your data source and script. Are you using JOIN in your script related to table CASES? A JOIN may unintentionally duplicate records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After all, maybe the value shown is indeed correct, so we might need also to discuss the way you've calculated the sum manually. How have you done it? As Sunny pointed out, a list box or table box will only show distinct combinations of values, it will not show duplicate records or sets of identical values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Feb 2017 20:24:58 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2017-02-14T20:24:58Z</dc:date>
    <item>
      <title>Incorrect SUM value</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272396#M623189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a value which is supposed to SUM room minutes, however I cannot get the value to line up with the manual calculation.&lt;/P&gt;&lt;P&gt;Here is my table model:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Tbls.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/153076_Tbls.png" style="height: 588px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the individual values for the room minutes:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Mins.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/153086_Mins.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;The sum of this is 1880&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I get when using the SUM function:&lt;/P&gt;&lt;P&gt;The value represented from this formula is 1970...?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sum.png" class="jive-image image-3" height="386" src="https://community.qlik.com/legacyfs/online/153087_sum.png" style="height: 385.548px; width: 769px;" width="769" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is the SUM value incorrect?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 18:20:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272396#M623189</guid>
      <dc:creator>andrewmo</dc:creator>
      <dc:date>2017-02-14T18:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect SUM value</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272397#M623190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;What you are seeing is the distinct values within Room Minutes field, but there might be multiple values for the same number. Sum([Room Minutes]) will sum all values. Not a good idea, but Sum(DISTINCT [Room Minutes]) will give the sum of distinct values within Room Minutes field. Is that what you want?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 18:25:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272397#M623190</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-14T18:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect SUM value</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272398#M623191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be use this in text box and then see in Straight/Pivot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum([Room Minutes]) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Or &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Sum(TOTAL [Room Minutes])&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Or&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Sum(Distinct [Room Minutes])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 18:31:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272398#M623191</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-02-14T18:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect SUM value</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272399#M623192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think "90" is not part of the selection "HILLCREST MAIN OR"&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/153092_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 18:47:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272399#M623192</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T18:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect SUM value</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272400#M623193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I selected each ID manually and it appears the 90 minute case is being summed twice. Not sure how or why...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="test.png" class="jive-image image-1" height="158" src="https://community.qlik.com/legacyfs/online/153091_test.png" style="height: 157.916px; width: 796px;" width="796" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 19:00:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272400#M623193</guid>
      <dc:creator>andrewmo</dc:creator>
      <dc:date>2017-02-14T19:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect SUM value</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272401#M623194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try &lt;STRONG&gt;Concat([Room Minutes],' | ') &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;as expression for debugging&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 19:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272401#M623194</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T19:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect SUM value</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272402#M623195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add Dimensions to the straight table from the tables CALBLOCK and STGII, you will be able to see where the data is duplicating. If still cannot find the values on which the expression is duplicating try adding dimensions from CASES table as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 19:28:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272402#M623195</guid>
      <dc:creator>aarkay29</dc:creator>
      <dc:date>2017-02-14T19:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect SUM value</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272403#M623196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to me like your issue can be explained only looking at the CASES table, since both the dimension and expression field originate from that table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the primary key of that table? Is it [Case No], i.e. is there only a single record per case no?&lt;/P&gt;&lt;P&gt;Or is it [Log ID]? Or a combination of fields?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to add the primary key to your straight table as dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way to investigate could be to check your data source and script. Are you using JOIN in your script related to table CASES? A JOIN may unintentionally duplicate records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After all, maybe the value shown is indeed correct, so we might need also to discuss the way you've calculated the sum manually. How have you done it? As Sunny pointed out, a list box or table box will only show distinct combinations of values, it will not show duplicate records or sets of identical values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2017 20:24:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1272403#M623196</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-14T20:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect SUM value</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1733857#M623197</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this debug method i've noticed my formula cut off after 68 seperates; yet the straight table has 75 rows; any clue what the cause is in this situation?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 16:39:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-SUM-value/m-p/1733857#M623197</guid>
      <dc:creator>janseng89</dc:creator>
      <dc:date>2020-08-06T16:39:33Z</dc:date>
    </item>
  </channel>
</rss>

