Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
HDavila
Regular Visitor

Grand Total not correct

Hi, I've been trying to calculate the grand totals but I don't understand why it is not calculating the right amount.

Below you can see the table with the amounts that I have in different measures.

PR TCE CalPR Net RevenuePR Net Expense
$23,004$713,100.28$0.00
$23,004$713,100.28$0.00
$14,298$443,290.07$69.05
   
PBI Cal$1,814,048.59$83.24
Correct Cal$1,869,490.63$69.05

 

As you can see the total that PBI calculates is showing 83.24 when the correct amount for the net expense is 69.05.  Because of this issue, I'm having incorrect grand totals for all my PR calculated measures.   Now, the PR TCE Cal takes the total of PR Net revenue - PR Net expenses and then divides the total by the 31 days.   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.

 

Have you encountered this problem before?  Can you help me troubleshoot this?

@Anonymous 

2 REPLIES 2
AlB
Community Champion
Community Champion

Hi @HDavila 

You'd need to show the code of your measures at the very least. Ideally share a pbix that reproduces the issue

Please mark the question solved when done and consider giving kudos if posts are helpful.

 Cheers 

SU18_powerbi_badge

HDavila
Regular Visitor

Hi @AlB ,

 

This is the DAX code I used for the Net Rev 

PR Net Revenue =
[PR Freight] + [PR TCO Hire] - [PR Address Comm] - [PR Broker Comm] + [PR Demurrage] + [PR Other Revenue] - [PR Offhire and Adj]
 
Now for the individual measures, for example, for PR Freight this is the code  (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)
PR Freight =
VAR TotalFreight =
SUMX('VPR Raw Data','VPR Raw Data'[Freight])
Return
VAR TotalVoyageDays =
SUMX('VPR Raw Data','VPR Raw Data'[Voyage Days])
Return
DIVIDE(TotalFreight,TotalVoyageDays) * [Prorated days]
 
For Prorated days:
 Prorated days = VALUE(SUMX('VPR Raw Data','VPR Raw Data'[Prorated End date] -'VPR Raw Data'[Prorated Start Date]))
 
 
Hopefully, this helps.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.