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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Subtraction between more than 3 columns

Hi, I am trying to get a value from the following example

The report is called 'Proposed TC Despatch Margins Report'[

Line ValueMatl_CostLab CostOH_CostImp_DutyFreightVariance
18,340.0011,546.085,841.061834.0657.62103.3373,968.45

The Dax formula I am using is: (Which produces the expected value of 17,731.55)

Std. Cost = Sum('Proposed TC Despatch Margins Report'[Matl_Cost])+Sum('Proposed TC Despatch Margins Report'[Lab Cost])+Sum('Proposed TC Despatch Margins Report'[OH_Cost])+Sum('Proposed TC Despatch Margins Report'[Imp_Duty])+Sum('Proposed TC Despatch Margins Report'[Freight])
 
To get the 'Variance' I am using the following :
Variance = [Line_Value]-Calculate([Std. Cost]). The result produced is 73,968.45 where it should be 608.48
 
This has bee driving me nuts over the passed day, trying numerious variations in trying to acheive the expected result with no joy
6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous ,

 

Can you share some sample data?

 

Best Regards,

Jay

parry2k
Super User
Super User

@Anonymous you can share using one drive/google drive.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous very hard to debug, can you share pbix with sample data, remove sensitive information before sharing.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Apologies, new to the forum.

I have the pbix file. How can I share with you?.

parry2k
Super User
Super User

@Anonymous are you adding variance as a measure or a column:

 

it should be a measure, assuming Line_Value is a column, you need to use aggregate function 

 

Variance = SUM([Line_Value])-[Std. Cost].

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi, Thanks for getting back to me so quick, much appreciated. 

I have tried using both a meassure and adding a column using many variations of the the folmula. Below is one I have tried currently:

Variance = Sum('Proposed TC Despatch Margins Report'[Line_Value])-Sum('Proposed TC Despatch Margins Report'[Matl_Cost])+Sum('Proposed TC Despatch Margins Report'[Lab Cost])+Sum('Proposed TC Despatch Margins Report'[OH_Cost])+Sum('Proposed TC Despatch Margins Report'[Imp_Duty])+Sum('Proposed TC Despatch Margins Report'[Freight])
It keeps giving the same incorrect result result. 
I had a good head of hair before starting

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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