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

Table Total not calculating correctly

Hi

 

Hope someone can help me with this.

 

I've created the following measure to calculate Cost as 2 products have bulk cost rules.

 

This works perfectly for me in my table visual. But because I've used the MAX function for the text, the total of this column is way off. What's a way to get around this?

Or is there a better way to have written this statement?

Thanks

 

[Total Sales] is a measure.

 

Total Cost =

IF([Total Sales] <= 3729 && MAX('Product Table'[Product Type])="A", [Total Sales]*232.20 ,

IF(MAX('Product Table'[Product Type])="A", 3729*232.20 + ([Total Sales]-3729)*241.92,

IF([Total Sales]<= 185 && MAX('Product Table'[Product Type])="B", [Total Sales]*333.24,

IF(MAX('Product Table'[Product Type])="B", 185*333.24 + ([Total Sales]-185)*399.24,

[Total Sales]*MAX('Product'[Cost])

))))

2 REPLIES 2
ribisht17
Super User
Super User

Please refer to this solution https://community.powerbi.com/t5/Desktop/Total-isn-t-being-calculated-correctly/m-p/2890211

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series

Anonymous
Not applicable

Hi @ribisht17 

I have tried the link you sent through. I am not sure how my calculation can be flipped to include the bulk cost rules. 

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors