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
alikwt
Regular Visitor

Keep the value as Negative for specific records

I have a Table named "ICS_Transaction" in my SQL Database. 

 

There is a column named "Net_Amt_LC" that shows the net amount of the transaction. 

 

There is another column named "Voucher_Type" that shows a value 2021 for Credit Sales Transactions and 2023 for Credit Sales Returns. 

 

The values in Net_Amt_LC are all positives. And I want to bring Net_Amt_LC values as negatives for all those transactions that has Voucher_Type = 2023

 

Please help! 

1 ACCEPTED SOLUTION
jthomson
Solution Sage
Solution Sage

In Power Query, make a column:

 

NALCneg = [Net_Amt_LC]*-1

 

Then make another column:

 

NewNALC = if [Voucher_Type] = 2021 then [Net_Amt_LC] else [NALCneg]

View solution in original post

1 REPLY 1
jthomson
Solution Sage
Solution Sage

In Power Query, make a column:

 

NALCneg = [Net_Amt_LC]*-1

 

Then make another column:

 

NewNALC = if [Voucher_Type] = 2021 then [Net_Amt_LC] else [NALCneg]

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.