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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jcoolen09
Regular Visitor

subtract values of Column A and Column B

I want to subtract the values from Column A and Column B 

jcoolen09_1-1715361900033.png

For example, for the first row, I would expect the New Column value to be the difference between 16.7 - 5.10, so I would expect a new value in New Column to be 11.6. The basic subtraction measures I've tried are giving results that make no sense to me. It's worth mentioning that Column B is Summed and Column A is not. 

 

jcoolen09_2-1715362058343.png

 

jcoolen09_3-1715362084345.png

 

please help! Thanks!

1 ACCEPTED SOLUTION
jcoolen09
Regular Visitor

solved this by using a Group By in the Transform Data. That seemed to fix up the calculations

View solution in original post

3 REPLIES 3
jcoolen09
Regular Visitor

solved this by using a Group By in the Transform Data. That seemed to fix up the calculations

nvprasad
Solution Sage
Solution Sage

Hi Jcoolen09,

 

Can you try the below measure?

 

Difference = CALCULATE(SUM(Data[A])-SUM(Data[B]))
 
Thank you,
 
If this solution helps, then please consider Accept it as the solution  to help the other members find it more quickly.

That does not work 

 

jcoolen09_0-1715364637814.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.