BI & Analytics
Blog
Tableau
5
min read

Tableau Custom Number Formatting

Master Tableau custom number formatting with copy-paste examples. Learn the syntax for positive, negative & zero values.
Author
Arend Verschueren
Arend Verschueren
Head of Marketing & RevOps
Tableau Custom Number Formatting
Share article

Tableau custom number formatting lets you control how numbers display in a view using a three-part syntax: positive ; negative ; zero. Right-click any number, choose Format, then pick Custom from the Numbers dropdown. Once you know what #, 0, , and . do, you can build any format you need. Currency in millions, KPI arrows that flip red on a decline, percentages with explicit signs.

This guide covers the syntax, then gives you ten format codes worth keeping in a snippet file.

What is Tableau custom number formatting?

Custom number formatting controls how a numeric value is displayed in a view, without changing the underlying data. It uses an Excel-style format string split into up to three semicolon-separated segments, each controlling a different value range: positive, negative, and zero.

The full reference lives in Tableau's official formatting numbers and null values documentation.

The same value of 1234567 could read as 1,234,567, $1.2M, ▲1.23M or 1.234.567. Built-in formats handle the basics. Custom formats are how you get clean tables, on-brand KPIs, and dashboards that don't look like a default install. It's one of several small skills that compound.

Tableau borrows its syntax from Excel, so most Microsoft conventions carry over. One key difference: custom number formats to color code text aren't applicable because you can apply color to text using the Marks card. Colour is the Marks card's job

How to access custom number formatting in Tableau

Three clicks to get there:

Step 1. Open the Format pane. Right-click (or Control-click on Mac) the field in your view and choose Format. To set a default format for the field everywhere it appears, right-click it in the Data pane and pick Default Properties → Number Format instead.

Step 2. Open the Numbers dropdown. In the Format pane, click Numbers.

Step 3. Select Custom. Pick Custom at the bottom of the list and type your format string.

Tip: start with a built-in format like Currency or Percentage, then switch to Custom. Tableau pre-fills the syntax it generated, which is the fastest way to see how each character behaves.

The syntax: positive ; negative ; zero

Every Tableau custom format follows the same three-part structure:

<positive format> ; <negative format> ; <zero format>

Tableau applies whichever segment matches the value being displayed. A few rules:

  • One segment: applies to all values; Tableau auto-prepends a minus sign for negatives.
  • Two segments: the first applies to positives and zeros, the second to negatives.
  • Three segments: explicit control over positives, negatives, and zeros.
  • Skipping a segment: leave it empty but keep the semicolon. #,##0;; shows positives and hides negatives and zeros.

Every example below builds on this structure.

10 Tableau custom format examples you'll actually use

Each one is copy-paste ready.

1. Basic thousands separator

#,##0

1234567 becomes 1,234,567. The simplest upgrade you can make to a number-heavy view.

2. Currency with two decimals

$#,##0.00;-$#,##0.00

1234.5 becomes $1,234.50. Swap $ for , £ or any other currency symbol. For locale-aware currencies (Swiss francs, Indian rupees), use Tableau's built-in Currency (Standard) option and set the Locale. That's the supported route for full international formatting.

3. Numbers in thousands (K) and millions (M)

#,##0,"K"
#,##0,,"M"
#,##0,,,"B"

Each trailing comma divides by a thousand. So 1500000 with #,##0,,"M" becomes 2M. For one decimal place: #,##0.0,,"M" gives you 1.5M.

4. KPI variance with arrows

▲#,##0;▼#,##0;0

+50 becomes ▲50, -50 becomes ▼50, 0 stays as 0. Pair with green/red conditional colour on the Marks card. The zero segment matters here. Drop it and Tableau reuses the positive segment, putting an upward arrow on every zero.

5. Zero as a dash

#,##0;-#,##0;-

Replaces 0 with a dash. Crosstabs go from cluttered to readable in one change. The eye skips the dashes and lands on the real numbers. If you're building text-heavy tables, the same principle of stripping visual noise drives the approach in elevate your text table to bridge the data confidence gap.

6. Percentage with explicit sign control

+0.0%;-0.0%;0.0%

Forces a + on positives, - on negatives, flat 0.0% on zero. Good for variance metrics where direction matters as much as magnitude.

7. Hide negative values

#,##0; ;0

Shows positives and zeros, hides negatives (the empty space between semicolons does the hiding). Mirror it as ; ;0 to show only zeros, or ;#,##0; to show only negatives.

8. Contextual text with the number

#,##0 "days ago";#,##0 "days to go";"Today"

5 becomes 5 days ago, -3 becomes 3 days to go, 0 becomes Today. Works for membership expiry, deadline trackers, anything time-relative. Same pattern for "users online", "in stock", and so on. For dynamic worksheet titles that pair well with this kind of contextual formatting, see personalising your Tableau dashboards with custom titles.

9. Replace numbers with words

"Positive";"Negative";"Zero"

Strips the number entirely and shows a label based on its sign. Useful when magnitude doesn't matter and you just want a status indicator.

10. Custom suffix or prefix

#,##0.0"°";-#,##0.0"°"

Adds a degree symbol: 21.5°. Swap the suffix for anything: "%", " kg", " pts", " MWh". Wrap text in double quotes.

Common mistakes and pro tips

Forgetting to quote text containing date letters. Write Sales #,##0 (no quotes) and Tableau sees the S, assumes you're formatting seconds, and the whole format breaks. Always wrap literal text in double quotes: "Sales "#,##0. Same goes for any text containing d, m, y, h, w, q, or s.

Trying to set colour via the format string. The Excel trick of [Red]#,##0 doesn't work in Tableau. Apply colour through the Marks card or via a calculated field. Tableau separates data formatting from visual encoding, and once you adjust, the split makes sense.

Confusing thousands and decimal separators across locales. 1,234.56 (US/UK) flips to 1.234,56 in much of continental Europe. Tableau follows the viewer's regional OS settings, not the author's. For mixed audiences, test both, or stick to K/M abbreviations to sidestep the ambiguity.

Forgetting the zero segment with arrows. If your KPI format uses for positives and you only define two segments, zero values inherit the positive format and get an upward arrow. Define the zero segment explicitly when using directional symbols.

Emojis render inconsistently. Paste an emoji into a format string and it works on Tableau Desktop. The same emoji may render differently on Tableau Public, Tableau Cloud, or across operating systems and browsers. Stick to Unicode symbols (▲ ▼ ► ◆ ★) over emojis (😀 📈 ✅) for anything heading to production.

Set defaults at the field level. If a measure should always show as currency in millions, don't reformat it every time. Right-click the field in the Data pane, choose Default Properties → Number Format and set it once. The format follows the field across the workbook.

Frequently Asked Questions

How do I format negative numbers in red in Tableau?

You can't set colour through the format string. Drag the measure onto the Color shelf on the Marks card, or use a calculated field that returns one value for positives and another for negatives. The format string controls the characters. The Marks card controls the colour.

What's the difference between # and 0 in Tableau number formatting?

# shows a digit if one exists and nothing if it doesn't. 0 shows a digit if one exists, or a literal zero if it doesn't. #.## renders 5 as 5. 0.00 renders 5 as 5.00. Use 0 when you want consistent decimal places or padded leading digits. Use # for clean significant-digits-only output.

How do I display numbers as thousands (K) or millions (M) in Tableau?

Add trailing commas after your digit placeholders. One comma divides by a thousand, two by a million. #,##0,"K" shows 1234567 as 1,235K. #,##0.0,,"M" shows it as 1.2M. The text in quotes is the unit label, so change it to whatever fits.

Can I use emojis in Tableau custom number formats?

Yes. Paste any emoji into the format string and Tableau renders it. But emojis render differently across Tableau Desktop, Public, Cloud, and across operating systems. For dashboards with a mixed audience, stick to Unicode symbols like ▲ ▼ ► ◆. They're far more consistent.

Why does my number format break when I add "Sales" as a prefix?

Because the S in "Sales" is interpreted as the date code for seconds, which derails the whole format string. Wrap literal text in double quotes: "Sales "#,##0, not Sales #,##0. Same goes for any text containing d, m, y, h, w, q, or s.

Wrap up

Custom number formatting is one of the small Tableau skills that pays off every time you build a view. Learn the positive ; negative ; zero structure and the # vs 0 distinction, and every dashboard reads a little cleaner. No calculated fields required.

Bookmark this page, copy what you need, tweak it to fit your data. If you'd like a hand sharpening your Tableau work, whether that's formatting, layout, performance, or the bigger question of whether your analytics stack is set up to scale, get in touch with Biztory. As an official Tableau partner, we help teams across Europe turn messy data into dashboards their stakeholders actually use.

Facts & figures

About client

Testimonial

Blogs you might also like

How to Create an Interactive Calendar in Tableau
Arrow icon darkArrow icon dark

How to Create an Interactive Calendar in Tableau

Learn how to create an interactive calendar in Tableau in 4 steps using a date scaffold and Set Actions. Step-by-step tutorial with calculations.

BI & Analytics
Blog
Tableau
How to sheet swap in Tableau in just 5 steps
Arrow icon darkArrow icon dark

How to sheet swap in Tableau in just 5 steps

Learn how to sheet swap in Tableau in 5 steps. Dynamically show/hide worksheets using parameters, save dashboard space, and fix common issues.

BI & Analytics
Blog
Tableau
Introducing Autom8: Automated workflows from within Tableau
Arrow icon darkArrow icon dark

Introducing Autom8: Automated workflows from within Tableau

Autom8 is here. Trigger workflows, sync data, and act on insights — all without ever leaving your dashboard.

BI & Analytics
Blog
Autom8
Tableau's order of operations
Arrow icon darkArrow icon dark

Tableau's order of operations

Learn more about Tableau's order of operations: or what happens when and how. Read the full blog here.

BI & Analytics
Blog
Tableau
Tableau Next features: the complete guide
Arrow icon darkArrow icon dark

Tableau Next features: the complete guide

Learn about the different features in Tableau Next and how they drive faster decision-making.

BI & Analytics
Blog
Tableau
5 Ways to Level Up Your Bar Chart Using Tableau Parameter Actions
Arrow icon darkArrow icon dark

5 Ways to Level Up Your Bar Chart Using Tableau Parameter Actions

Tableau Parameter Actions are a great feature in Tableau. Read all about it in our latest blog.

BI & Analytics
Blog
Tableau
Everything you need to know about Tableau Certifications
Arrow icon darkArrow icon dark

Everything you need to know about Tableau Certifications

Thinking of taking one of the Tableau Certifications? We explore how to get ready in our latest blog. Read all about it here.

BI & Analytics
Blog
Tableau
Personalise your Tableau Dashboard with Custom Titles
Arrow icon darkArrow icon dark

Personalise your Tableau Dashboard with Custom Titles

Learn about how to add the personal touch to your Tableau Dashboard with custom titles.

BI & Analytics
Blog
Tableau
Bar Charts: The Good, the Bad, and the Ugly
Arrow icon darkArrow icon dark

Bar Charts: The Good, the Bad, and the Ugly

Why can bar charts be effective and how to use them to get answers easier, and faster!

BI & Analytics
Blog
Tableau
How to create a waterfall chart in Tableau
Arrow icon darkArrow icon dark

How to create a waterfall chart in Tableau

Learn how to create your own waterfall charts in Tableau Desktop by following these steps.

BI & Analytics
Blog
Tableau
The Ultimate Guide to Embedded Analytics
Arrow icon darkArrow icon dark

The Ultimate Guide to Embedded Analytics

Discover what embedded analytics is all about and how it can drive additional revenue streams for your business.

BI & Analytics
Blog
ThoughtSpot
How to label pie charts in Tableau
Arrow icon darkArrow icon dark

How to label pie charts in Tableau

Learn more on how to label pie charts in Tableau like a pro.

BI & Analytics
Blog
Tableau
How to label bar charts in Tableau
Arrow icon darkArrow icon dark

How to label bar charts in Tableau

Learn how to label bar charts in Tableau like a pro and level up your dashboard design. Read the full article here.

BI & Analytics
Blog
Tableau
How to create a donut chart in Tableau
Arrow icon darkArrow icon dark

How to create a donut chart in Tableau

Looking to create a donut chart in Tableau? Read our in-depth guide on how to level up your donut charts in Tableau here.

BI & Analytics
Blog
Tableau
How to ace your ThoughtSpot certifications?
Arrow icon darkArrow icon dark

How to ace your ThoughtSpot certifications?

Learn more about ThoughtSpot certifications and how to ace your exams.

BI & Analytics
Blog
ThoughtSpot
How to stop marks being highlighted when ‘clicked’ in Tableau
Arrow icon darkArrow icon dark

How to stop marks being highlighted when ‘clicked’ in Tableau

Learn how to stop marks from being highlighted when clicked in Tableau.

BI & Analytics
Blog
Tableau
How to Create Multiple Select Parameters in Tableau
Arrow icon darkArrow icon dark

How to Create Multiple Select Parameters in Tableau

Learn how to create multiple select parameters in Tableau to add more control and interactivity to your analysis.

BI & Analytics
Blog
Tableau
How to apply conditional formatting to tooltips in Tableau
Arrow icon darkArrow icon dark

How to apply conditional formatting to tooltips in Tableau

Learn how to apply conditional formatting to tooltips in Tableau with our step-by-step guide. Improve your data visualization skills today with Biztory.

BI & Analytics
Blog
Tableau
Rediscovering Business Intelligence with Sigma Computing
Arrow icon darkArrow icon dark

Rediscovering Business Intelligence with Sigma Computing

Discover how Sigma Computing is reshaping the BI landscape with its user-friendly interface and powerful capabilities.

BI & Analytics
Blog
Sigma
Sigma Computing: Our Favourite Features
Arrow icon darkArrow icon dark

Sigma Computing: Our Favourite Features

Discover our favourite features of Sigma for powerful and fun data analysis.

BI & Analytics
Blog
Sigma
Tableau vs. Power BI: Everything to know
Arrow icon darkArrow icon dark

Tableau vs. Power BI: Everything to know

Compare Tableau and Power BI to determine the best business intelligence tool for your needs.

BI & Analytics
Blog
Tableau
Tableau Map Layers: Getting Started (1/3)
Arrow icon darkArrow icon dark

Tableau Map Layers: Getting Started (1/3)

Learn how to leverage Tableau's Map Layers feature to create complex visualizations.

BI & Analytics
Blog
Tableau
Tableau Map Layers: Pull everything into one view (3/3)
Arrow icon darkArrow icon dark

Tableau Map Layers: Pull everything into one view (3/3)

Use Tableau Map Layers to combine multiple visuals in a single worksheet and create custom dashboard views for enhanced data visualization.

BI & Analytics
Blog
Tableau
Tableau Map Layers: Building Different Charts (2/3)
Arrow icon darkArrow icon dark

Tableau Map Layers: Building Different Charts (2/3)

Learn how to create Pie, Doughnut, Line, and Area charts using Tableau Map Layers.

BI & Analytics
Blog
Tableau