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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Total Sum Not adding up for specific rows

Hi, Need Help. My total sum for my Total Cost Column adds up correctly for 40HC "container size" but not for 40FT "container size". I am using one formula for my Total Cost column which is 

Total Cost = [Shipment Count] * SUM('FCL Pricing'[FCL Price]). The total cost for 40FT somehow is double the correct answer. See picture below. I also tried to just multiply HBL count or shipment count by FCL price and it still just doubles the cost only for 40FT. Any idea how to solve this?
 

Total Sum not adding correctly on all rows.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous 
If that is not possible we have to force a row contxt like

Sumx(Summarize(Table, Table[Origin], Table[Container Size], Table[CBM],Table[Shipment Count], "_max",Max('FCL Pricing'[FCL Price])),[Shipment Count]*[_max])

 

I can not tell you the best combination without looking at data. What all should be there in the group by of summarize

Should max be there Max/Average/SUM etc for 'FCL Pricing'[FCL Price]

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

6 REPLIES 6
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Is this problem solved?

 

If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


If not, please share me a dummy PBIX file, removing sensitive information.

 


Best Regards,
Icey

amitchandak
Super User
Super User

@Anonymous 
If that is not possible we have to force a row contxt like

Sumx(Summarize(Table, Table[Origin], Table[Container Size], Table[CBM],Table[Shipment Count], "_max",Max('FCL Pricing'[FCL Price])),[Shipment Count]*[_max])

 

I can not tell you the best combination without looking at data. What all should be there in the group by of summarize

Should max be there Max/Average/SUM etc for 'FCL Pricing'[FCL Price]

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you all for your help. Amitchandak's formula solved it. Thank you Amitchandak.

@Anonymous , Please mark the reply as a solution.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
edhans
Super User
Super User

I don't know what [Shipment Count] is. I suspect you need to be using SUMX() and not SUM() here, but without more context as to what is going on, difficult to know.

How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.