Colorize Your Numbers: Setting Negative and Positive Numbers to Different Colors in Tableau

Jacob Jul 28, 2026

In the realm of data visualization, Tableau stands out as a powerful tool that enables users to create interactive and insightful dashboards. One of the key features that sets Tableau apart is its ability to customize visualizations to enhance understanding and communication of data. One such customization is the ability to set negative and positive numbers to different colors, a technique known as conditional formatting. This can significantly improve the readability and interpretability of your visualizations, especially when dealing with data that spans both positive and negative values.

Negative Numbers – What’s Your Sign?
Negative Numbers – What’s Your Sign?

In this guide, we will delve into the process of setting negative and positive numbers to different colors in Tableau. We will explore the steps involved, provide practical examples, and discuss best practices to ensure that your visualizations are not only aesthetically pleasing but also informative and engaging.

1NG Rainbow Negative | Coloring Squared
1NG Rainbow Negative | Coloring Squared

Understanding Conditional Formatting in Tableau

Conditional formatting, also known as color palettes, allows you to apply different colors to data based on certain conditions. In the context of this guide, we will focus on applying different colors based on whether the data is positive, negative, or zero. Understanding this feature is crucial before we dive into the implementation process.

four different color wheels with the names and colors in each section, including warm, cool
four different color wheels with the names and colors in each section, including warm, cool

Tableau offers a range of pre-built color palettes, but it also provides the flexibility to create your own. This means you can tailor the colors to your specific needs, ensuring that your visualizations align with your organization's branding or reflect the data's context effectively.

Default Color Palettes in Tableau

Using an Excel Formula to Work with Positive and Negative Numbers - 6 Examples - ExcelDemy
Using an Excel Formula to Work with Positive and Negative Numbers - 6 Examples - ExcelDemy

Tableau's default color palettes are designed to provide a balance between aesthetics and data interpretation. They include schemes like '10 Colors', '20 Colors', and 'Diverging', among others. Each scheme offers a range of colors that can be used to differentiate between data points. For instance, the 'Diverging' palette is particularly useful when dealing with data that spans both positive and negative values, as it includes a midpoint color (usually a shade of gray) to represent zero or neutral values.

To access these default color palettes, you can follow these steps: Right-click on the field you want to format in the 'Marks' card, select 'Color', and then choose the desired palette from the 'Color' shelf. Tableau will automatically apply the colors based on the data's distribution.

Creating Custom Color Palettes in Tableau

How To Highlight All Negative Numbers In Red In Excel
How To Highlight All Negative Numbers In Red In Excel

While the default color palettes are versatile, there may be instances where you need to create a custom palette to better represent your data. Creating a custom palette involves defining the colors and their corresponding data ranges. This can be particularly useful when you want to highlight specific data points or ranges, or when you need to align the colors with your organization's branding.

To create a custom color palette, you can follow these steps: Right-click on the field you want to format in the 'Marks' card, select 'Color', and then click on the 'Edit Colors' button. This will open the 'Edit Colors' dialog box, where you can define the colors and their corresponding data ranges. You can also choose to use a 'Gradient' to smoothly transition between colors.

Setting Negative and Positive Numbers to Different Colors in Tableau

two numbers are on the opposite side of each other, and one has an arrow
two numbers are on the opposite side of each other, and one has an arrow

Now that we have a solid understanding of conditional formatting and color palettes in Tableau, let's delve into the process of setting negative and positive numbers to different colors. This process involves creating a calculated field to identify the data's sign (positive, negative, or zero) and then using this field to apply different colors.

Before we proceed, it's important to note that this process requires a basic understanding of Tableau's calculated fields and the use of the 'IF' function in Tableau's calculation language. We will provide a step-by-step guide to help you through the process, but if you're new to calculated fields, you may want to familiarize yourself with the basics before proceeding.

Negative Photo Palette for Vector Art
Negative Photo Palette for Vector Art
an info sheet with different colors and numbers on the bottom right hand corner, which includes information about each color
an info sheet with different colors and numbers on the bottom right hand corner, which includes information about each color
a number line with negative numbers on it and an arrow pointing to the opposite one
a number line with negative numbers on it and an arrow pointing to the opposite one
How to Make Negative Numbers Red in Google Sheets - ModernSchoolBus.com
How to Make Negative Numbers Red in Google Sheets - ModernSchoolBus.com
How to Sum Negative and Positive Numbers in Excel - 2 Methods - ExcelDemy
How to Sum Negative and Positive Numbers in Excel - 2 Methods - ExcelDemy
someone is writing numbers on a piece of paper with a pencil in their left hand
someone is writing numbers on a piece of paper with a pencil in their left hand
a hand holding a pen over a piece of paper with numbers and symbols on it
a hand holding a pen over a piece of paper with numbers and symbols on it
Changing Negative Numbers to Positive in Excel (9 Examples) - ExcelDemy
Changing Negative Numbers to Positive in Excel (9 Examples) - ExcelDemy
Tinz Twins (@tinztwins) on X
Tinz Twins (@tinztwins) on X
an array of circles with crosses and equals on them, all in red and blue
an array of circles with crosses and equals on them, all in red and blue
Understanding how positive and negative numbers interact
Understanding how positive and negative numbers interact
How to Create Stacked Area Chart with Negative Values in Excel - ExcelDemy
How to Create Stacked Area Chart with Negative Values in Excel - ExcelDemy
Negative Numbers in Real Life
Negative Numbers in Real Life
Positive or Negative?
Positive or Negative?
Positive Negative Number Line Anchor Chart, Fabric Classroom Decor
Positive Negative Number Line Anchor Chart, Fabric Classroom Decor
Negative Plus Negative
Negative Plus Negative
Change Tab Color (Worksheet Tab Background Color)
Change Tab Color (Worksheet Tab Background Color)
Comment construire votre stratégie de frais de port ?
Comment construire votre stratégie de frais de port ?
a cartoon dog wearing a santa hat next to a number line with negative and positive numbers on it
a cartoon dog wearing a santa hat next to a number line with negative and positive numbers on it

Creating a Calculated Field to Identify the Data's Sign

To set negative and positive numbers to different colors, we first need to create a calculated field that identifies the sign of each data point. This field will be used to apply different colors based on whether the data is positive, negative, or zero.

To create a calculated field, follow these steps: Right-click in the 'Data' pane, select 'Create Calculated Field', and then enter the following formula: IF [Your Field] > 0 THEN "Positive" ELSEIF [Your Field] < 0 THEN "Negative" ELSE "Zero" END. Replace 'Your Field' with the name of the field you want to format. This formula will return 'Positive', 'Negative', or 'Zero' based on the sign of the data in the specified field.

Applying Different Colors Based on the Data's Sign

Now that we have a calculated field that identifies the sign of each data point, we can use this field to apply different colors. To do this, follow these steps: Drag the calculated field you created (e.g., 'Sign') to the 'Color' shelf in the 'Marks' card. Tableau will automatically apply different colors based on the data's sign.

If you're not satisfied with the default colors, you can customize them by right-clicking on the calculated field in the 'Color' shelf and selecting 'Edit Colors'. This will open the 'Edit Colors' dialog box, where you can define the colors and their corresponding data ranges. For instance, you might choose to use green for positive values, red for negative values, and gray for zero values.

Best Practices for Setting Negative and Positive Numbers to Different Colors in Tableau

While the process of setting negative and positive numbers to different colors in Tableau is relatively straightforward, there are several best practices to keep in mind to ensure that your visualizations are informative, engaging, and aesthetically pleasing.

First and foremost, always consider the context of your data and the message you want to convey. The colors you choose should reflect the data's meaning and help to highlight the most important insights. For instance, you might choose to use bold, contrasting colors to draw attention to significant positive or negative values.

Use Color Blindness-Friendly Palettes

It's crucial to ensure that your visualizations are accessible to all users, including those with color blindness. Tableau offers several color blindness-friendly palettes that can be used to create visualizations that are accessible to a wider audience. These palettes use a combination of colors and patterns to differentiate between data points, making them easier to distinguish for users with color blindness.

To access these palettes, you can follow these steps: Right-click on the field you want to format in the 'Marks' card, select 'Color', and then choose the 'Color Blindness' palette from the 'Color' shelf. You can also create your own color blindness-friendly palette by using a combination of colors and patterns.

Keep it Simple and Uncluttered

While it can be tempting to use a wide range of colors to differentiate between data points, it's important to strike a balance between complexity and clarity. Using too many colors can make your visualization difficult to read and interpret, so it's best to stick to a simple and uncluttered color scheme.

Similarly, avoid using too many different shades or hues of the same color, as this can make it difficult for users to distinguish between data points. Instead, opt for a small number of distinct colors that can be easily differentiated from one another.

Test and Refine Your Visualizations

Finally, it's important to test and refine your visualizations to ensure that they are effective and engaging. This might involve showing your visualizations to colleagues or stakeholders and gathering their feedback, or using Tableau's built-in testing tools to assess their performance.

Tableau's 'Story Points' feature, for example, allows you to create interactive presentations that guide users through your data, helping you to identify any areas where your visualizations might be unclear or confusing. By testing and refining your visualizations, you can ensure that they are as effective and engaging as possible.

In conclusion, setting negative and positive numbers to different colors in Tableau is a powerful way to enhance the readability and interpretability of your visualizations. By understanding conditional formatting and color palettes, creating calculated fields to identify the data's sign, and following best practices for color use, you can create visualizations that are informative, engaging, and accessible to all users. So, go ahead and experiment with different color schemes, test your visualizations, and refine them until they tell your data's story in the most effective and engaging way possible.