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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Frequent Visitor

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
Frequent Visitor

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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