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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
EmileeJade
Frequent Visitor

Change amount to a negative value based on data from a second table

Hello. I am new to using Power BI and cannot seem to achieve what I need.

 

My data comes from a microsoft SQL database and there are two tables linked together. A dollar value exist in one table, and the transaction type of the dollar value (whether an invoice or a credit) exists in a second table.

 

Here it my table called dTransactions. The highlighted item should be a negative value

EmileeJade_0-1687448098740.png

 

This is my second table called dSplitInvoices. The highlighted item is the matching invoice and shows a C for transaction type.

EmileeJade_1-1687448169239.png

 

I know I need to create a new column that would change the macthing C items to a negative value. I assume this would be with an if statement, but am not sure how to make it work. I tried this based off reading other posts, but it doesn't work. It just creates the column with the same data.

 

EmileeJade_2-1687450419006.png

 

Any help would be appreicated.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

@EmileeJade 

You need first to merge the teo tables and retrieve the Transaction Type column from dSplitInvoices to dTransactions. Once done you can insert an if statement into "Replace Values" to change credit values to negative. 

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

@EmileeJade 

You need first to merge the teo tables and retrieve the Transaction Type column from dSplitInvoices to dTransactions. Once done you can insert an if statement into "Replace Values" to change credit values to negative. 

Thank you so much!!! This is what I needed

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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