How to Make a Sankey Diagram in Google Sheets
A static spreadsheet of user engagement or sales funnel data doesn't tell the full story - you need to see the flow. Sankey diagrams are perfect for visualizing how values move from one stage to another, turning flat numbers into an insightful narrative. This article will walk you through exactly how to structure your data and build a Sankey diagram directly within Google Sheets.
What Exactly is a Sankey Diagram?
A Sankey diagram is a type of flow diagram where the width of the arrows or bands is proportional to the quantity of the flow. Think of it like visualizing a river system. The main river (your total traffic or budget) splits into smaller streams (different sources or categories), which might converge or split again. The wider the stream, the bigger the volume it carries.
They are exceptionally good at answering questions that involve distribution and process, such as:
- Where do visitors go on our website after landing on the homepage?
- How is our marketing budget allocated across different channels and campaigns?
- At which stage do we lose the most prospects in our sales funnel?
Unlike a pie chart that just shows proportions of a whole, or a bar chart that compares distinct totals, a Sankey visualizes the connections and transitions between multiple stages in a process. This makes it a go-to choice for tracking journeys, whether it’s the journey of a customer, a dollar, or a user session.
Step 1: Get Your Data Ready
The single most important step in creating a Sankey diagram precedes even opening the chart editor. It’s all about structuring your data correctly. Google Sheets needs the data in a specific three-column format to understand the relationships you want to visualize.
Your data needs to be organized into three columns:
- Source: The starting point of the flow.
- Target: The ending point of the flow for that specific value.
- Value (or Weight): The quantity or size of that specific flow.
Each row in your spreadsheet represents a single path from a source to a target. Let's look at a practical example. Imagine we want to visualize the flow of website traffic from different marketing channels to the top landing pages.
Here’s how you would structure that data in your Google Sheet:
Example Data Structure: Website Traffic Flow
In this table, each row defines one connection. For instance, the first row tells Google Sheets to draw a path from “Organic Search” to “Homepage” with a thickness representing 8,200 sessions. Items that appear in both the Source and Target columns (like Homepage if you were doing a multi-step user flow) will be automatically treated as intermediary nodes in your diagram.
Step 2: Create the Sankey Diagram in Google Sheets
Once your data is perfectly structured, creating the chart is surprisingly straightforward. Google Sheets has a built-in Sankey chart option, though it’s a bit tucked away compared to more common charts like line or bar graphs.
Follow these quick steps:
- Select your data range. Click and drag your cursor to highlight all the cells containing your three-column data, including the headers.
- Insert the chart. Navigate to the menu bar and click on Insert > Chart.
- Change the chart type. Google Sheets will likely try to guess a chart type for you - it's almost never going to be a Sankey. Don't worry. In the Chart editor pane that appears on the right, find the 'Chart type' dropdown.
- Find the Sankey option. Scroll all the way down the chart type list until you see the section labeled “Other.” The Sankey chart option will be there. Click on it.
That's it! Google Sheets will immediately transform your raw data into a visual Sankey diagram. You should see your "Source" nodes on the left, your "Target" nodes on the right, and colorful bands connecting them, with the thickness of each band representing its value.
Step 3: Customize Your Sankey Aesthetics
The default Sankey is functional, but a little customization can make it much clearer and more visually appealing for your report or presentation.
In the Chart editor, toggle from the 'Setup' tab to the 'Customize' tab. Here are the key areas you'll want to adjust:
Chart Style
This is where you can change the basics like the background color and border of your chart box. You can also set a universal font for all the text in your chart, which is useful for maintaining consistency with your brand or report style.
Sankey
This is the most important section for fine-tuning your diagram’s appearance. You'll find options for both the "Links" (the connecting bands) and the "Nodes" (the bars on the left and right).
- Links: You have control over the color. You can set the color based on the source node, the target node, or choose a gradient. For our website traffic example, coloring by the source would give each acquisition channel (Organic, Paid Social, etc.) its own distinct color, making it easy to trace their paths across the diagram.
- Nodes: Here you can manage the colors of the bars themselves. You can also customize the node labels - changing their font, size, and color to ensure they are readable. One helpful little setting is the ‘Show empty labels’ toggle, though it’s less relevant if your data is well-structured.
Chart & Axis Titles
Always give your chart a descriptive title. Instead of "Sessions vs. Landing Page," use something more illustrative like "Website Traffic Flow by Acquisition Channel." This immediate context makes the chart understandable at a glance. You can also add subtitles for further context.
Spend a few minutes playing with these settings. A thoughtful use of color and clear labeling can dramatically improve how effectively your diagram communicates information.
Best Practices for Effective Sankey Diagrams
Now that you know how to build a Sankey chart, keep these tips in mind to make sure your visualizations are clear and insightful, not confusing and cluttered.
1. Group Minor Flows into an "Other" Category
If you have many small flows, your diagram can quickly become a tangled mess of thin, unreadable lines. To prevent this, consider grouping the smallest data points into a single "Other" category. For example, if you have ten traffic sources but the bottom seven make up less than 5% of your total traffic, combine them into one row in your data. This cleans up the chart and puts the focus on the most significant flows.
2. Be Mindful with Colors
Color should add meaning, not just decoration. Using color based on the source or a logical category is a great way to help the viewer interpret the diagram quickly. Avoid using completely different colors for every single link if it doesn’t add new information, it just creates visual noise. Stick with a limited, consistent color palette.
3. Order Your Data Strategically
The vertical order of nodes in a Sankey diagram often matches the order in your source data. You can sometimes improve readability and reduce awkward line crossings by arranging the rows in your source sheet. For example, you might place your largest "Source" values at the top of your sheet so they appear at the top of the chart.
4. Provide Clear Labels and Context
A Sankey diagram is rarely self-explanatory. Always present it with a clear title and, if necessary, a short description or key takeaways. Ensure the node labels are fully visible and not truncated. If labels overlap, you might need to simplify the data or slightly adjust the chart size to give them more room.
Final Thoughts
Sankey diagrams offer a powerful way to represent complex flows within your data, and getting them built in Google Sheets is entirely possible once you master the simple three-column data structure. It's an excellent method for moving beyond basic charts to tell a more compelling story about how your processes genuinely work.
Of course, the most tedious part of this process is often getting all that data from platforms like Google Analytics, Shopify, or your CRM into that one perfectly clean Google Sheet. The time spent exporting CSVs and manually cleaning data is a huge bottleneck for many teams. We built Graphed to solve exactly this problem. Instead of wrestling with spreadsheets, we let you connect your data sources directly and simply ask for what you need - like, "Create a Sankey chart showing our customer journey from ad channel to purchase for last month." We instantly build a live, interactive visualization, letting you skip the manual work and get right to the insights.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.