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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jrpoli2000
Frequent Visitor

Value adjustment

 

Can anyone please help me with 2 measures or calculated columns to make adjustments on INVOICE PAYMENT and PENDING columns. ADJUSTED INVOICE PAYMENT column will only calculate the rows with negative amounts on the PENDING column by adding INVOICE PAYMENT column and PENDING column while those with non-negative amount will reain as it is.

 

Below is the the data table and the expected output for the 2 measures.

 

DATA TABLE   
INVOICE NOINVOICE AMTINVOICE PAYMENTPENDING
135.0736-0.93
2450.8445.934.87
3576576.88-0.88

 

 

Expected output :

MEASURE 1MEASURE 2
ADJUSTED INVOICE PAYMENTADJUSTED PENDING
35.070
445.934.87
5760

 


 Thanks!!!

1 ACCEPTED SOLUTION
JDLee23
Helper I
Helper I

Not an amazingly elegant solution, but this should work:

 

Add two calculated columns as below - 

 

Adjusted Invoice Payment = IF ( Pending < 0 , InvoicePayment - Pending, InvoicePayment )

 

Adjusted Pending = IF ( Pending < 0, 0, Pending )

 

Hope this helps!

 

View solution in original post

2 REPLIES 2
JDLee23
Helper I
Helper I

Not an amazingly elegant solution, but this should work:

 

Add two calculated columns as below - 

 

Adjusted Invoice Payment = IF ( Pending < 0 , InvoicePayment - Pending, InvoicePayment )

 

Adjusted Pending = IF ( Pending < 0, 0, Pending )

 

Hope this helps!

 

Thanks a lot!!! You just cured my weeklong headacheSmiley Happy

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.