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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors