<?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 Grand Total not correct in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grand-Total-not-correct/m-p/1049479#M14322</link>
    <description>&lt;P&gt;Hi, I've been trying to calculate the grand totals but I don't understand why it is not calculating the right amount.&lt;/P&gt;&lt;P&gt;Below you can see the table with the amounts that I have in different measures.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PR TCE Cal&lt;/TD&gt;&lt;TD&gt;PR Net Revenue&lt;/TD&gt;&lt;TD&gt;PR Net Expense&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$23,004&lt;/TD&gt;&lt;TD&gt;$713,100.28&lt;/TD&gt;&lt;TD&gt;$0.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$23,004&lt;/TD&gt;&lt;TD&gt;$713,100.28&lt;/TD&gt;&lt;TD&gt;$0.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$14,298&lt;/TD&gt;&lt;TD&gt;$443,290.07&lt;/TD&gt;&lt;TD&gt;$69.05&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PBI Cal&lt;/TD&gt;&lt;TD&gt;$1,814,048.59&lt;/TD&gt;&lt;TD&gt;$83.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Correct Cal&lt;/TD&gt;&lt;TD&gt;$1,869,490.63&lt;/TD&gt;&lt;TD&gt;$69.05&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see the total that PBI calculates is showing 83.24 when the correct amount for the net expense is 69.05.&amp;nbsp; Because of this issue, I'm having incorrect grand totals for all my PR calculated measures.&amp;nbsp; &amp;nbsp;Now, the PR TCE Cal takes the total of PR Net revenue - PR Net expenses and then divides the total by the 31 days.&amp;nbsp; &amp;nbsp;I notice that the PR TCE Cal is correct per line but the total amount is incorrect since it is taking the incorrect totals of the revenue and the expenses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you encountered this problem before?&amp;nbsp; Can you help me troubleshoot this?&lt;/P&gt;&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2020 02:17:32 GMT</pubDate>
    <dc:creator>HDavila</dc:creator>
    <dc:date>2020-04-27T02:17:32Z</dc:date>
    <item>
      <title>Grand Total not correct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grand-Total-not-correct/m-p/1049479#M14322</link>
      <description>&lt;P&gt;Hi, I've been trying to calculate the grand totals but I don't understand why it is not calculating the right amount.&lt;/P&gt;&lt;P&gt;Below you can see the table with the amounts that I have in different measures.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;PR TCE Cal&lt;/TD&gt;&lt;TD&gt;PR Net Revenue&lt;/TD&gt;&lt;TD&gt;PR Net Expense&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$23,004&lt;/TD&gt;&lt;TD&gt;$713,100.28&lt;/TD&gt;&lt;TD&gt;$0.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$23,004&lt;/TD&gt;&lt;TD&gt;$713,100.28&lt;/TD&gt;&lt;TD&gt;$0.00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;$14,298&lt;/TD&gt;&lt;TD&gt;$443,290.07&lt;/TD&gt;&lt;TD&gt;$69.05&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PBI Cal&lt;/TD&gt;&lt;TD&gt;$1,814,048.59&lt;/TD&gt;&lt;TD&gt;$83.24&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Correct Cal&lt;/TD&gt;&lt;TD&gt;$1,869,490.63&lt;/TD&gt;&lt;TD&gt;$69.05&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see the total that PBI calculates is showing 83.24 when the correct amount for the net expense is 69.05.&amp;nbsp; Because of this issue, I'm having incorrect grand totals for all my PR calculated measures.&amp;nbsp; &amp;nbsp;Now, the PR TCE Cal takes the total of PR Net revenue - PR Net expenses and then divides the total by the 31 days.&amp;nbsp; &amp;nbsp;I notice that the PR TCE Cal is correct per line but the total amount is incorrect since it is taking the incorrect totals of the revenue and the expenses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you encountered this problem before?&amp;nbsp; Can you help me troubleshoot this?&lt;/P&gt;&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 02:17:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grand-Total-not-correct/m-p/1049479#M14322</guid>
      <dc:creator>HDavila</dc:creator>
      <dc:date>2020-04-27T02:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Grand Total not correct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grand-Total-not-correct/m-p/1050330#M14343</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="224679" data-lia-user-login="HDavila" class="lia-mention lia-mention-user"&gt;HDavila&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'd need to show the code of your measures at the very least. Ideally share a pbix that reproduces the issue&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 09:10:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grand-Total-not-correct/m-p/1050330#M14343</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-04-27T09:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Grand Total not correct</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grand-Total-not-correct/m-p/1050939#M14377</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the DAX code I used for the Net Rev&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PR Net Revenue = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[PR Freight] + [PR TCO Hire] - [PR Address Comm] - [PR Broker Comm] + [PR Demurrage] + [PR Other Revenue] - [PR Offhire and Adj]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now for the individual measures, for example, for PR Freight this is the code &amp;nbsp;&lt;EM&gt;(I use the same code for all measures the only difference is the column that is referenced on the first variance, in this example is the Freight column)&lt;/EM&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PR Freight = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR TotalFreight = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX('VPR Raw Data','VPR Raw Data'[Freight])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR TotalVoyageDays = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMX('VPR Raw Data','VPR Raw Data'[Voyage Days])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE(TotalFreight,TotalVoyageDays) * [Prorated days]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;For Prorated days:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;SPAN&gt;Prorated days = VALUE(SUMX('VPR Raw Data','VPR Raw Data'[Prorated End date] -'VPR Raw Data'[Prorated Start Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hopefully, this helps.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Apr 2020 13:10:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grand-Total-not-correct/m-p/1050939#M14377</guid>
      <dc:creator>HDavila</dc:creator>
      <dc:date>2020-04-27T13:10:54Z</dc:date>
    </item>
  </channel>
</rss>

