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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Employee
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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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