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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.