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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
PowerBINoob12
Helper I
Helper I

how to take two values from a column and subtract them from each other

Hi

i'm trying to figure out how to subtract the two values in the column "count" from each other.

This is a filtered table so I cant pivot it etc.

hoping there is some code that will put each value in a variable and then I can subtract them after.

PowerBINoob12_0-1682006430940.png

any advise would be greatly appreciated.

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@PowerBINoob12 

You can write a measure to calculate each amount then subtract the measures.

Total Count = CALCULATE ( SUM ( 'YourTable'[Count] ), 'YourTable'[Metric] = "Grand Total" )
Manual Count = CALCULATE ( SUM ( 'YourTable'[Count] ), 'YourTable'[Metric] = "Manual" )
Difference = [Total Count] - [Manual Count]

View solution in original post

2 REPLIES 2
PowerBINoob12
Helper I
Helper I

Thank you so much for your help - this was slowly draining the life from me 🙂

 

jdbuchanan71
Super User
Super User

@PowerBINoob12 

You can write a measure to calculate each amount then subtract the measures.

Total Count = CALCULATE ( SUM ( 'YourTable'[Count] ), 'YourTable'[Metric] = "Grand Total" )
Manual Count = CALCULATE ( SUM ( 'YourTable'[Count] ), 'YourTable'[Metric] = "Manual" )
Difference = [Total Count] - [Manual Count]

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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