Last Modified Date: 06 Nov 2023
Environment
Tableau DesktopAnswer
Option 1: Display Zeros as Blanks
- From the Data pane (where the Dimensions and Measures are displayed), right-click the field that you want to format, and then select Default Properties > Number Format.
- Select Custom, enter #,##0.000; -#,##0.000;"", and then click OK.
Option 2: Display Zeros as Dashes
- From the Data pane (where the Dimensions and Measures are displayed), right-click the field that you want to format, and then select Default Properties > Number Format.
- Select Custom, enter #,##0.000;-#,##0.000;-, and then click OK.
Option 3: Display Zeros as Dashes
- Select Analysis > Create Calculated Field.
- In the Calculated Field dialog box that opens, do the following and then click OK:
- Name the calculated field.
- In the formula field, create a calculated field similar to the following:
IF [<field name>] = 0 THEN "-" ELSE ROUND(STR([<field name>]), n) END
Where n is the number of decimal places that are to be shown in the view.
Note: This calculated field will convert the measure to a string. You will not be able to use this calculated field for calculating averages and other numeric operations.
Additional Information
- Note: Right-clicking the field under the 'Measures' shelf and selecting Default Properties > Number Format will not apply that format to a field that is already part of the view, if the field's formatting is not already set to Automatic. This allows separate formatting options to be set across worksheets that use the same field.
- A field's formatting can be changed on a worksheet-by-worksheet basis by right-clicking the field on the view and selecting 'Format...'. Otherwise, default properties will be used when a field is first brought to a new worksheet.
- Clearly and Simply: Tableau Quick Tip #2 – Custom Number Formats (How to use Tableau Software’s Custom Number Formats)
- Microsoft Office: Create or delete a custom number format
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials