Mastering Tableau: How to Color Code Numbers

Color coding numbers in Tableau is a powerful technique that helps bring your data visualizations to life. By effectively using color, you can highlight trends, comparisons, or even categorical data, making your dashboards more engaging and easier to understand.

the font and numbers in different colors are shown on this page, which shows that each letter
the font and numbers in different colors are shown on this page, which shows that each letter

The process involves creating distinct color palettes for different numerical ranges or categories. Let's delve into the step-by-step guide on how to achieve this, ensuring your data insights pop out from the страницы.

100+ Trending Canva Color Palette Hex Codes 🎨
100+ Trending Canva Color Palette Hex Codes 🎨

Understanding Color Palettes

Before we dive into the steps, it's crucial to understand what makes a good color palette. Tables should make data easily distinguishable, not overwhelming, thus, avoid using too many colors or those with low contrast.

a color chart with the numbers in different colors and letters on each side, including one letter
a color chart with the numbers in different colors and letters on each side, including one letter

Tableau provides pre-built palettes, but for advanced customization, you can explore color pickers or tools like Color Brewer with its thoughtful combinations.

Step 1: Creating Calculated Fields

Pure
Pure

To color code numbers, we create calculated fields. These are formulas that transform your data, allowing for conditional formatting. Let's, for instance, color QC Pass/Fail results based on their numeric scores.

New calculated field formula: IF [Score] > 80 THEN "Pass" ELSE "Fail" END

Step 2: Applying Color

an orange and white poster with numbers on it's sides, in different colors
an orange and white poster with numbers on it's sides, in different colors

After creating the calculated field, apply the color coding to your visualization.

For a bar chart, right-click on the [Score] field in the Marks pane, select "Color" > "Edit Color". Here, choose the field you created (e.g., "QC Result") and set corresponding color ranges.

Expanding on Color Coding with Legend

Half past orange: A rainbow color clock
Half past orange: A rainbow color clock

A well-designed legend makes your dashboards more user-friendly, providing context to your color-coded numbers.

In Tableau, ensure your legend is visible by clicking the "Show/Hide Legend" button in the "Marks" pane. You can also customize its appearance, such as changing the size or position.

Excel Custom Number Format Guide • My Online Training Hub
Excel Custom Number Format Guide • My Online Training Hub
All colour pentone with CMYK code
All colour pentone with CMYK code
the color scheme for blue gray is shown in three different shades, each with their corresponding numbers
the color scheme for blue gray is shown in three different shades, each with their corresponding numbers
Custom Number Formats - Colors » Chandoo.org - Learn Excel, Power BI & Charting Online
Custom Number Formats - Colors » Chandoo.org - Learn Excel, Power BI & Charting Online
the color chart for each sewing project, with different colors and numbers to choose from
the color chart for each sewing project, with different colors and numbers to choose from
How to Color Code Notes for Faster Revision (Study Tips)
How to Color Code Notes for Faster Revision (Study Tips)
Calendar Color Coding: Best Colors & How-To Guide [2026]
Calendar Color Coding: Best Colors & How-To Guide [2026]
Using Unicode Character Symbols in Excel
Using Unicode Character Symbols in Excel
the printable pixel color by number chart
the printable pixel color by number chart
the color code for stampin'up 2019 - 19 colors is shown in this image
the color code for stampin'up 2019 - 19 colors is shown in this image
the color cross reference chart is shown in blue and white, with numbers on each side
the color cross reference chart is shown in blue and white, with numbers on each side
the color palettes for each type of text are shown in different colors and sizes
the color palettes for each type of text are shown in different colors and sizes
Benefits of Color Calibration
Benefits of Color Calibration
a large poster with many different types of symbols and numbers on it's sides
a large poster with many different types of symbols and numbers on it's sides
an image of color chart with different colors
an image of color chart with different colors
#0f6a80 · Color Palette
#0f6a80 · Color Palette
several different colors of paint are shown in this collage with the names and numbers on them
several different colors of paint are shown in this collage with the names and numbers on them
Urban Color Codes – Bold Tabby Cat Paint by Numbers · Freebie
Urban Color Codes – Bold Tabby Cat Paint by Numbers · Freebie
Stitch Color by Number Fun Coloring Pages
Stitch Color by Number Fun Coloring Pages
Diamond Painting Tips - Give your un-numbered Diamonds a DMC number
Diamond Painting Tips - Give your un-numbered Diamonds a DMC number

Using Diverging Color Palettes

For continuous data (e.g., numeric scales with negative values), use a diverging palette. These center around zero and symmetrically diverge in both positive and negative directions.

Example: [-100 to 0] - Blue shades, [0 to 100] - Red shades. This helps visualize high and low values effectively.

Handling Missing or Null Values

Missing or null values can be manually handled to avoid confusion in your visualization.

In your calculated field, consider including a condition for null values: IF ISBLANK([Score]) THEN "Missing" END

Tailor your color coding strategy to match your dataset and desired narrative. Experiment with different palettes, legends, and conditional formatting to create the perfect representation of your data. Happy visualizing!

Related Articles

What Is The Color Code For Midnight Blue Tableau Color Code Positive Negative Values How To Color Code Cells In Excel Based On Value Tableau Color Positive Negative Values How To Color Code In Excel Color By Number Text Color By Number Thanksgiving Sheet How Do I Color Code Positive And Negative Numbers In Excel Color By Number Numbers To 20 Telling Time Color By Number Free