<?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 Totals not working correctly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22444#M776116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;((Sum([Suppliers FTL Cost]) + Sum([Suppliers Drop Cost])) - &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(if(Sum({&amp;lt;[ContractorType] = {'Base Rate'}&amp;gt;} ContractorRate) = 0,sum([FFW FTL Cost]) - sum([Ad-Hoc FTL Cost]),Sum({&amp;lt;[ContractorType] = {'Base Rate'}&amp;gt;} ContractorRate)) +&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Sum({&amp;lt;[ContractorType] = {'Drop Rate'}&amp;gt;} ContractorRate) = 0,sum([FFW Drop Cost]) - sum([Ad-Hoc Drop Cost]),Sum({&amp;lt;[ContractorType] = {'Drop Rate'}&amp;gt;} ContractorRate)))) /&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum([Suppliers FTL Cost]) + Sum([Suppliers Drop Cost]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing is that the Total is not calculating correctly.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/200874_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;The calculation should be &lt;STRONG&gt;Total Cost Diff&lt;/STRONG&gt; (column) divided by &lt;STRONG&gt;Suppliers Total Cost&lt;/STRONG&gt; (column).&amp;nbsp; Then display this as a percentage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the body of the table the calculation is working perfectly but for the total it is completely wrong! This should be doing&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2772.49 / 42574.64 = 6.51%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed any light why this is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>jamelmessaoud</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Totals not working correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22444#M776116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;((Sum([Suppliers FTL Cost]) + Sum([Suppliers Drop Cost])) - &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(if(Sum({&amp;lt;[ContractorType] = {'Base Rate'}&amp;gt;} ContractorRate) = 0,sum([FFW FTL Cost]) - sum([Ad-Hoc FTL Cost]),Sum({&amp;lt;[ContractorType] = {'Base Rate'}&amp;gt;} ContractorRate)) +&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Sum({&amp;lt;[ContractorType] = {'Drop Rate'}&amp;gt;} ContractorRate) = 0,sum([FFW Drop Cost]) - sum([Ad-Hoc Drop Cost]),Sum({&amp;lt;[ContractorType] = {'Drop Rate'}&amp;gt;} ContractorRate)))) /&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum([Suppliers FTL Cost]) + Sum([Suppliers Drop Cost]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing is that the Total is not calculating correctly.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/200874_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;The calculation should be &lt;STRONG&gt;Total Cost Diff&lt;/STRONG&gt; (column) divided by &lt;STRONG&gt;Suppliers Total Cost&lt;/STRONG&gt; (column).&amp;nbsp; Then display this as a percentage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the body of the table the calculation is working perfectly but for the total it is completely wrong! This should be doing&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2772.49 / 42574.64 = 6.51%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed any light why this is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22444#M776116</guid>
      <dc:creator>jamelmessaoud</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Totals not working correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22445#M776117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use Sum(Aggr()) on both numerator and denominator expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(NumeratorExpression, YourDimension/s))/Sum(Aggr(DenominatorExpression, YourDimension/s))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:18:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22445#M776117</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-04-26T12:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Totals not working correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22446#M776118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds horrible! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me do that with the expression I have? The dimensions in my table are Contractor and [Delivery Full Postcode] if that helps?&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, 26 Apr 2018 12:21:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22446#M776118</guid>
      <dc:creator>jamelmessaoud</dc:creator>
      <dc:date>2018-04-26T12:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Totals not working correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22447#M776119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bingo!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Done it.&amp;nbsp; Thanks Sunny &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22447#M776119</guid>
      <dc:creator>jamelmessaoud</dc:creator>
      <dc:date>2018-04-26T12:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Totals not working correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22448#M776120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;Sum(Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;((Sum([Suppliers FTL Cost]) + Sum([Suppliers Drop Cost])) -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(if(Sum({&amp;lt;[ContractorType] = {'Base Rate'}&amp;gt;} ContractorRate) = 0,sum([FFW FTL Cost]) - sum([Ad-Hoc FTL Cost]),Sum({&amp;lt;[ContractorType] = {'Base Rate'}&amp;gt;} ContractorRate)) +&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(Sum({&amp;lt;[ContractorType] = {'Drop Rate'}&amp;gt;} ContractorRate) = 0,sum([FFW Drop Cost]) - sum([Ad-Hoc Drop Cost]),Sum({&amp;lt;[ContractorType] = {'Drop Rate'}&amp;gt;} ContractorRate))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;,Contractor, [Delivery Full Postcode]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;Sum(Aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Sum([Suppliers FTL Cost]) + Sum([Suppliers Drop Cost]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #ff0000;"&gt;,Contractor, [Delivery Full Postcode]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22448#M776120</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-04-26T12:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Totals not working correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22449#M776121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lol okay &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:26:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22449#M776121</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-04-26T12:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Totals not working correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22450#M776122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help again.&amp;nbsp; Don't know what I would do without this community/yourself ! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 12:28:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Totals-not-working-correctly/m-p/22450#M776122</guid>
      <dc:creator>jamelmessaoud</dc:creator>
      <dc:date>2018-04-26T12:28:35Z</dc:date>
    </item>
  </channel>
</rss>

