1 2 Previous Next 14 Replies Latest reply on Nov 22, 2017 1:14 PM by Curtis Spraitzar

    How to Limit Two Dimensions in Sankey Dashboard to Top 10 Values

    Curtis Spraitzar

      Background:  We constructed a Sankey dashboard using the method outlined in https://www.youtube.com/watch?v=1HwCzlA9hI4  by SuperDataScience.  It was built using Tableau Desktop Version 10.4.1, 64-bit. In the data connection, we used a custom SQL formula to duplicate the entire dataset for the Sankey chart.


      Goals: The goals of our Sankey dashboard were to (1) show the flow of raw materials (on the left) to producers (on the right), based on volume, (2) filter the results by location, and (3) show only the top raw materials and producers on each side of the Sankey chart.


      Results: To do this, we created three worksheets (the Sankey Chart, the Raw Materials Bar Chart, and the Producer Bar Chart), and then combined them in a single dashboard. Both raw materials and producers were sorted in descending order. This allowed the viewer to see the most important raw materials and producers toward the top, while relegating the lesser important ones toward the bottom. The resulting dashboard looked like this:




      Because of the large number of raw materials and producers, especially those with low volumes, we sought to limit each side of the Sankey chart to show only the Top 10 raw materials by volume, and for those raw materials shown, only the top producers (not to exceed 10). We tried several methods to achieve this kind of filtering, but without success:


      1. We tried using the “Top 10” filters available in Tableau, but the raw materials bar chart skipped over certain raw materials when a specific location (as opposed to all locations) was selected.
      2. We added a context filter for location, but had the same result as Method #1.
      3. We also tried using a Dense Rank function for raw materials and producers, but (1) there were too many ties in the case of low volumes, and (2) the Sankey chart curves did not correctly match the raw materials with the producers.


        Any suggestions would be appreciated.  A workbook with anonymized data is attached. 


      Message was edited by: Curtis Spraitzar Added a 10.2 version of the viz.

        1 2 Previous Next