KNOWLEDGE BASE

How to hide '%' sign when using Percent of Total


Published: 20 Jul 2022
Last Modified Date: 21 Jul 2022

Question

How to hide '%' sign when using Percent of Total

AS IS
User-added image

TO BE
User-added image

Environment

  • Tableau Desktop

Answer

You will need to create another calculated field for the Label.

<STEP 1>
Create the view
1. Connect to Sample - Superstore.
2. Drag [Sub-Category] to Rows shelf.
3. Drag [Sales] to Columns shelf.
4. Right click on [Sales] on Columns shelf. -> Quick Table Calculation -> Percent of Total
User-added image
5. Click on Sort button.
User-added image
6. While holding down the Ctrl button, drag [Sales] on Columns shelf to Label.
User-added image

'%' sign is displayed on the label.
User-added image

<STEP 2>
Hiding '%' of Label
7. Create a new Calculated Field as following
    Name : Percent of Total Label
    Calculation : ROUND(RUNNING_SUM(SUM([Sales]) / ATTR({FIXED : SUM([Sales])})*100),2)
8. Drag [Percent of Total Label] over the [SUM(Sales)] on the Label.
User-added image
9. Right click on [Percent of Total Label] -> Edit Table Calculation
User-added image
10. Set as following
User-added image

% sign is hidden in the labels.
User-added image
Did this article resolve the issue?