3 Replies Latest reply on Mar 27, 2020 6:08 AM by Ken Flerlage

    Sankey Diagram not connecting correctly to adjacent bar charts

    Rebecca Willis

      Hi everyone- I am trying to create a Sankey diagram that shows how website users flow between various page types in a website (packaged workbook attached). I used the example from the Information lab. The left side is "previous page" type in Google Analytics and the right side is the current page type. I've created the page type groupings in R and am using the file exported from R to create this viz. I think the sankey diagram is accurate, but I'm having trouble getting it to connect correctly to the corresponding bar chart on the left, as well as the right.

       

      Not correct size on left side:

       

      sankeyLeftSide.png

       

      Connecting at completely wrong place on right side (and probably wrong size as well).. hard to see here, but I was hovering over the top box on the right and all of the sankey arms are going to the bottom:

       

      sankeyRightSide.png

       

      Please help me, Tableau Warriors!

       

      -Rebecca

        • 1. Re: Sankey Diagram not connecting correctly to adjacent bar charts
          Ken Flerlage

          I haven't worked with this tutorial much so I may give you slightly different instructions, but the following should correct this:

           

          First, the sorting on the curve sheet needs to match the sorting on the left and right bars. It needs to sort first by Previous Page Type in ascending order then Page Type in ascending order.

           

          Next, reverse the axis on the curve chart.

          On the Page Type sheet, make sure that the pill on the rows shelf is a percent of total table calculation.

           

          You have the same filters on all the sheets so it's best right-click one set of them and set them to apply to all sheets. Also, the original has these added to context so do that as well.

           

          Next, fix all the axes to run from 0 to 1 (all three sheets). It now looks better on the left side at least:

          The last issue seems to be only impacting those with a starting point of Reporting & Tools:

          Not sure what's causing this at this point. Will come back to it later and see what I can find.

           

          Also, I should note that I have a set of plug and play sankey templates that you may find easier to use: The Flerlage Twins: Analytics, Data Visualization, and Tableau: Sankey

          • 2. Re: Sankey Diagram not connecting correctly to adjacent bar charts
            Rebecca Willis

            Thanks so much for your help, @Ken! And thanks also for sharing the link to your site! Once I'm finished with a couple of big reports and presentations for work, I'm definitely going to head over there and soak up all of the good stuff.

             

            I think I know what the issue is with Reports & Tools (and now Search, too): the sigmoid curve isn't working correctly when connecting left-to-right for arms that should actually be straight across the diagram (the arms are horizontal versus diagonal). Any ideas for how to best address this?

             

            Thanks again!

             

            -Rebecca

            • 3. Re: Sankey Diagram not connecting correctly to adjacent bar charts
              Ken Flerlage

              I took a look at it a bit last night. It's not just the Reports & Tools data either. The inconsistency in the curve would point to a problem with the calculated fields or the way those table calcs are computed, but I did not see anything obvious.