Zeroes into -

DCarrillo
New Contributor III

DGC_0-1662486377852.png

 

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

Can I accomplish the above with an If Statement?

 

6 REPLIES 6

TonyToniTone
Contributor II

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.  

TonyToniTone_0-1662516879180.png

Hope this helps

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

TonyToniTone
Contributor II

Add here in your Cube View and see what happens

TonyToniTone_0-1662564995364.png

 

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

TonyToniTone
Contributor II

I tested with a Cube View with derived 0's

TonyToniTone_0-1662578721905.png

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

TonyToniTone_1-1662578892385.png

Zeros turned in dashes

TonyToniTone_2-1662578943381.png

Also worked in a If Statement

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

 

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

DGC_0-1662579700800.png