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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

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.