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
I am attempting to do some dynamic measure formatting on a DAX measure. However, I'm having difficulty getting negative values to display with parentheses instead of the negative symbol.
For example, if I have a value of -132,500,000, I want to display it as ($132) M.
The dynamic measure formatting is working great for positive numbers, I'm just unsure how to get it to display correctly with negative values.
VAR CurrentValue = SELECTEDMEASURE()
RETURN
SWITCH (
TRUE(),
CurrentValue <= -1000000, "($#,0,,.) M",
CurrentValue > -1000000 && CurrentValue < 0, "($#,##0)",
CurrentValue >= 0 && CurrentValue < 1000000, "$#,##0",
CurrentValue >= 1000000, "$#,0,,. M"
)
Solved! Go to Solution.
Hi @swolfe2
I would recommend this:
VAR CurrentValue = SELECTEDMEASURE()
VAR AbsValue = ABS ( CurrentValue )
RETURN
IF (
AbsValue >= 1000000,
"$#,0,,. M;($#,0,,.) M",
"$#,##0;($#,##0)"
)
This makes use of the "<positive format>;<negative format>" structure.
Does this work for you?
Hi @swolfe2
I would recommend this:
VAR CurrentValue = SELECTEDMEASURE()
VAR AbsValue = ABS ( CurrentValue )
RETURN
IF (
AbsValue >= 1000000,
"$#,0,,. M;($#,0,,.) M",
"$#,##0;($#,##0)"
)
This makes use of the "<positive format>;<negative format>" structure.
Does this work for you?
Worked perfectly, and is an elegant solution. Thanks so much!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |