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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
PaulBoyes
Regular Visitor

Sales Ledger Aged Debts

I have two tables, one contains Sales Invoices and the other contains Sales Receipts.  There is a relationship between the tables using the Invoice number.

 

Any Invoice may have zero, one or many receipts associated.

 

I want to create a report that a) Calculates each invoice balance by deducting the total of receipts from the invoice amount and b) Displays just those invoices with a non zero balance.

 

 

 

 

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

Create a measure for total invoice balance and total receipts using sum. Create another measure for balance by subtracting one from the other. I would wrap this in an if statement to return blank instead of zero 

 

balance = if ([measure 1] -[measure 2]=0,blank(),[measure 1] -[measure 2])

 

use the invoice number from sales receipts on rows in a matrix and place balance in values. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

1 REPLY 1
MattAllington
Community Champion
Community Champion

Create a measure for total invoice balance and total receipts using sum. Create another measure for balance by subtracting one from the other. I would wrap this in an if statement to return blank instead of zero 

 

balance = if ([measure 1] -[measure 2]=0,blank(),[measure 1] -[measure 2])

 

use the invoice number from sales receipts on rows in a matrix and place balance in values. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.