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.







.avif)


.avif)












