Forum Discussion

ykaja's avatar
ykaja
Frequent Visitor
2 years ago
Solved

Custom formatting shows empty parenthesis

A measure is defined as difference of two columns.

 

Custom formatting is defined as #,##;(#,##);"0" . This is mainly to display negative numbers in brackets. For difference of 0, it shows empty brackets(as shown below) for some values instead of 0.

 

 

Any thoughts on fixing this please? Thanks

 

  • Can you try adding ROUND ( ... , 0 ) around the measure you're applying the custom format to? If that fixes the issue, then your problem very likely is that they are small negative values (possibly floating point errors), not actual zeros.

6 Replies

  • I think in custom formatting notation, a # drops away if it's zero and I'm guessing the values are small negative numbers that round to zero but aren't actually zero (so the zero formatting doesn't apply).

    You could try #,##0;(#,##0);"0", which I'd expect to return (0) instead of () or you could try rounding into the measure.

    • ykaja's avatar
      ykaja
      Frequent Visitor

      AlexisOlson The values are whole numbers. So the difference should show '0' as both are same numbers.

      Already tried this #,##0;(#,##0);"0" and it returns (0) instead of blank parenthesis.

      • AlexisOlson's avatar
        AlexisOlson
        Super User

        Can you try adding ROUND ( ... , 0 ) around the measure you're applying the custom format to? If that fixes the issue, then your problem very likely is that they are small negative values (possibly floating point errors), not actual zeros.