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
Can I stop the FORMAT function from rounding up? Please see my code below.
Solved! Go to Solution.
Hi @sa34techer - To prevent rounding, you can modify your logic to handle the formatting conditionally without using FORMAT for precise values (e.g., numbers below a certain threshold).
try the updated version of measure:
Measure =
VAR _salesMeasure = [Measure]
VAR _result =
SWITCH(
TRUE(),
ABS(_salesMeasure) > 1000000000, FORMAT(_salesMeasure, "\$#,,,.0B;(\$#,,,.0B)"),
ABS(_salesMeasure) > 1000000, FORMAT(_salesMeasure, "\$#,,.0M;(\$#,,.0M)"),
ABS(_salesMeasure) > 1000, FORMAT(DIVIDE(_salesMeasure, 1000, 0), "\$#K;(\$#K)"),
ABS(_salesMeasure) > 0, FORMAT(_salesMeasure, "\$#,##0.00;(\$#,##0.00)")
)
RETURN
_result
check the above and let me know.
Proud to be a Super User! | |
Hi @sa34techer - To prevent rounding, you can modify your logic to handle the formatting conditionally without using FORMAT for precise values (e.g., numbers below a certain threshold).
try the updated version of measure:
Measure =
VAR _salesMeasure = [Measure]
VAR _result =
SWITCH(
TRUE(),
ABS(_salesMeasure) > 1000000000, FORMAT(_salesMeasure, "\$#,,,.0B;(\$#,,,.0B)"),
ABS(_salesMeasure) > 1000000, FORMAT(_salesMeasure, "\$#,,.0M;(\$#,,.0M)"),
ABS(_salesMeasure) > 1000, FORMAT(DIVIDE(_salesMeasure, 1000, 0), "\$#K;(\$#K)"),
ABS(_salesMeasure) > 0, FORMAT(_salesMeasure, "\$#,##0.00;(\$#,##0.00)")
)
RETURN
_result
check the above and let me know.
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 33 | |
| 32 | |
| 31 | |
| 26 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |