Sunday, January 17, 2016

Web Analytics and Power BI: Utilizing a Sankey Diagram to Visualize Site Traffic


One of the more exciting features of Power BI is the ability to utilize custom visuals developed by third parties to visualize data. As a self-professed web analytics data geek, I took the opportunity to try out one of the newer custom visualizations, the Sankey diagram, in order to visualize the flow of traffic on The graphic below highlights a sample visualization created using the Sankey diagram leveraging data from


The first step in utilizing the Sankey diagram is to prepare a data set from your web analytics tool. In the case of, we utilize Google Analytics to capture activity on our web site. You will need three data attributes (two dimensions and one measure) in order to prepare your data set: Page Category (the dimension level you would like to analyze traffic), Page Views (metric), and the succeeding page (Second Page dimension in Google Analytics). Since there is no dimension in Google Analytics called Page Category, a surrogate could be Page Group (Content Group section). In the case of, we currently do not use the Page Group dimension. Therefore, I used the Page Path Level 1 dimension. I would not recommend that you use the actual Page dimension, as the Sankey diagram will not display if you have too many values. Even if it does display, you do not want to have too many values as the visualization quickly becomes an eye chart and patterns are difficult to see.

Once you load your data set (don’t forget to strip out forward slashes from the dimensions in the Power BI Editor), group your attributes as shown in the left-most graphic below. You may need to adjust your filter settings to optimize the data displayed in the visualization.


So that’s it. You now have a great way to display the flow of data on your web site and impress your Chief Marketing Officer.