KNOWLEDGE BASE

Calculating Percent of Total for Sankey Chart


Published: 02 Dec 2016
Last Modified Date: 20 Jul 2023

Question

How to find the percent of total for individual flow lines in a Sankey chart.

Environment

Tableau Desktop

Answer

The result of the below instructions can be reviewed in the attached sample workbook.
  1. Create a calculated field with the formula:SUM([Measure])/TOTAL(SUM([Measure]))
  2. Place the calculated field on Tooltip.
  3. Right-click the calculated field on the Marks card and select Edit Table Calculation.
    • Compute using > Specific Dimensions
    • Check the boxes next to "Project Num" and then "Budget Center Num". Uncheck other boxes.
    • For Sort Order, select Custom > [Measure] > Ascending. 
  4. Right click the calculated field and select Format.
    • In the Format panel, select the Pane tab. 
    • Select Numbers > Percentage.
    • Set Decimal Places to 2.
  5. Edit the Tooltip as desired.

Additional Information

For additional details and help about Sankey Diagrams, see the following external posts and third party content:
Did this article resolve the issue?