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
alhyde
New Member

DAX Formula for subtracting columns?

I am trying to caluculate current year revenue(column C) by subtracting prior revenue (column B) from revenue to date (column A).  In theory, the formula would be A - B = C.  Would I use some form of SUM formula to subtract these?  I'm new to Power BI and need help, please!  I've worked on this several hours, with little success.  All suggestions are welcome!

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@alhyde

 

Try with:

 

C=Calculate (Sum(Table[A]))-Calculate (Sum(Table[B]))




Lima - Peru

View solution in original post

4 REPLIES 4
v-micsh-msft
Microsoft Employee
Microsoft Employee

Hi alhyde,

 

What is your current situation?

The formula provided by Vvelarde should have the same results with the formula below:

C = A - B

 

Adding a blog for reference:

Understanding Context Transition

If that formula didn't meet your requirements, then please post back.

Regards

Vvelarde
Community Champion
Community Champion

@alhyde

 

Try with:

 

C=Calculate (Sum(Table[A]))-Calculate (Sum(Table[B]))




Lima - Peru

What if one of these tables is a measure?

 

Can you do C = A - B if B is [B]?

@Vvelarde thanks for the solution!  It worked!

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.