Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Howdy All -
I'd like to create a calculated column that flips a number to it's negative value based on a second column's designation of debit or credit. The table below is the one I'm trying to do this in - it's being pulled in from one of our DB's so can't flip the sign in the DB unfortunately. I'd like the DAX to first look at the debcred column, if the value is 'D', then take the value in the amount column and put it into the calculated column but with a negative sign. If the value is a 'C', just copy the value into the calculated column without changing its sign. There's a way to do this in Excel with a -ABS function but, from what I can tell, the DAX version of that function doesn't support that (or does it??). Is there a DAX statement that will accomplish what I'm after?
Thank you
Solved! Go to Solution.
There is the ABS function in dax: https://learn.microsoft.com/en-us/dax/abs-function-dax
but, you can always just use -1 * [amount], or even -[amount]
There is the ABS function in dax: https://learn.microsoft.com/en-us/dax/abs-function-dax
but, you can always just use -1 * [amount], or even -[amount]
Thank you Vicky, that worked.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |