Forum Discussion

DCarrillo's avatar
DCarrillo
New Contributor III
3 years ago

Zeroes into -

 

I am trying to change the zeroes in my report to become '-'.

Can I accomplish the above with an If Statement?

 

  • Have you tried adding something like this in the Cell Format under Number Format? 0;-0;"-"?  If you have a Custom Number Format, it follows the same formatting as Excel.  Excel Custom Number Format offers 4 arguments.  Argument 1 is for the Display of Positive Numbers, Argument 2 is for the Display of Negative Numbers, Argument 3 is for the Number Zero Format, and Argument 4 is for Text.  There are plenty of links on this subject online.  

    Hope this helps

    • DCarrillo's avatar
      DCarrillo
      New Contributor III

      How would I transform my zeroes into dashes in OS though?

    • DCarrillo's avatar
      DCarrillo
      New Contributor III

      The text is not available under the drop-down menu so the zeroes are now blanks instead of dashes.

  • I tested with a Cube View with derived 0's

    Used [#,###,0;(#,###,0);"-"] in Number Format for Cell Format

    Zeros turned in dashes

    Also worked in a If Statement

    If (CellAmount = 0.00) Then
        NumberFormat = [#,###,0;(#,###,0);"-"]
    Else
        NumberFormat = [#,###,0;(#,###,0);0]
    End If

     

    • DCarrillo's avatar
      DCarrillo
      New Contributor III

      Ok, for the Cell Format am I entering that information in Row or Column? Or below in the screenshot?