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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
josimarjr
New Member

Calculate the outstanding amount receivable from an invoice total

Hello,

I need to calculate the balance receivable from the total invoice according to the context of the table below:

The problem is that the invoice amount is repeated across the lines.

It is necessary to calculate in DAX taking into account the invoice number (In the example 165995) the invoice amount (121,558.46) and the sum of the amounts received (75,288.80).

Return = 46,269.66

I manage to get this result, but only when I filter the invoice, when I remove the filter from the invoice, I no longer have the result.

 

I need to add the receivable amount in both contexts of the attached images.

Considering the invoice amount - total receipts

Thanks

 

01.png02.png

3 REPLIES 3
tamerj1
Super User
Super User

Hi @josimarjr 

what should be the expected result of the first context?

What exactly have you tried and exactly was the problem?

HI  @tamerj1 

 

Basically I want to calculate in DAX the amount of the invoice (In the example 165995) and value (121,558.46) minus the sum of the amounts received (75,288.80).

Return = 46,269.66

The big problem is that the invoice amount is repeated because of the number of receipt lines.

Thanks

@josimarjr 

Then try to use MAX invoice value instead of SUM

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.