When representing numbers in Tableau, particularly when illustrating a change between a category or period, adding preceding +/- signs to your values can make changes more immediately visible. However, this is not a readily available option within number formatting.
The following steps will allow you to create this view:
These values are the difference in the survival rate (%) between the most recent period and the previous period. To prefix these numbers with +/-, right click on the field within the data pane (to alter the default), or right-click on the number within the canvas (to only make this change in the current view).
Open the correct part of the formatting section, select the “Custom” number format, and enter the following: “+”0.0%;”-“0.0% (see below).
- The “+” “-” specify to add these strings in from of our values.
- The % adds a % to the number format.
- The ‘0.0’ specifies that our values should be represented by one decimal place.
- The semi-colon is the separator between our positive and negative values.
To alter the number of decimal places, simply adjust the formula. This will add two decimal places instead on one.
Additionally, if your value is not a percentage, simply remove the “%” from the formula:
Enjoy!
Data: Our World in Data – Five-year cancer survival rates in the US.