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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
lcasey
Post Prodigy
Post Prodigy

Create new Table calculating Balances

Hello,

 

Does anyone know how to create a table in Power BI by calculating the balance of customers?

 

I have a customer table, it contains Invoices and payments.   If you Subtract the payments from the invoice that is the current balance.

 

So what formula woud I Use to create a new table with only customers that have a balance?

 

In the table below I have several Customers, only 1 has a balance. I want to create a table that ONLY has that 1 customer with a balance.

 

 

CUSTNMBRDOCNUMBRDOCDATE CURNCYIDCCURNCYIDPPTRXDSCRNOriginal Amt USDAmount
ZWARTWOUDSLS0032694/4/2007 0:00 EUR Net 30SETT NL$10,021$10,021
ZWARTWOUD220549/7/2007 0:00 EUR Net 30SETT-NL 7,500$0($10,021)
ZYDOWICZSLS0081233/31/2009 0:00SLS008123USDUSDNet 30SETT-POLAND 1,500$500$500
ZYDOWICZ3213411/17/2009 0:00 USDUSDNet 30SETT-POLAND 1,500$0($500)
NEST INC522327/1/2013 0:00 JPYJPYNet 30ENF EXP JPY 475,744$0($4,800)
NEST INCSLS0180777/1/2013 0:00 JPYJPYNet 30SETT JPY 2,547,109$25,700$25,700
NEST INC524298/6/2013 0:00 USDJPYNet 30PMT JPY 2,071,365$0($20,900)
TESTSLS9999910/1/2013 0:00 USDJPYNet 30PMT JPY 2,071,365$0$5,000

 

 

 

 

 

 

2 REPLIES 2
v-haibl-msft
Microsoft Employee
Microsoft Employee

@lcasey

 

I’m not sure which columns in your provided table are Invoices and Payments, so I just test with following table. You can create a measure for Balance first and then use CALCULATETABLE Function to create a table only includes customers with balance.

 

Create new Table calculating Balances_1.jpg

 

Balance =
CALCULATE ( SUM ( Table1[Invoices] ), ALLEXCEPT ( Table1, Table1[Customer] ) )
- CALCULATE ( SUM ( Table1[Payments] ), ALLEXCEPT ( Table1, Table1[Customer] ) )
HasBalance = 
CALCULATETABLE ( Table1, FILTER ( Table1, [Balance] > 0 ) )

 

Create new Table calculating Balances_2.jpg

 

Best Regards,

Herbert

Greg_Deckler
Community Champion
Community Champion

You should just have to filter your table visualization by Amount greater than 0



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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