How to Create a Sankey Diagram in Power BI

Cody Schneider7 min read

A Sankey diagram is one of the best ways to show how something flows from one stage to another. Whether you're tracking website traffic, a marketing funnel, or a budget, it beautifully illustrates the size and movement between different categories. This article will show you exactly how to build a dynamic Sankey diagram in Power BI, step by step.

What Exactly is a Sankey Diagram?

Think of a Sankey diagram as a more advanced flowchart. Instead of just showing connections, it uses the width of the lines - or "links" - to represent the quantity or volume of the flow. A thicker link means a larger quantity is moving between two points, which are called "nodes."

For example, you could use a Sankey to show a customer's journey on your website:

  • The first set of nodes could be traffic sources: Organic Search, Paid Ads, Social Media.
  • The next set of nodes could be the landing pages they visit: Homepage, Product Page, Blog Post.
  • The final nodes could be conversions: Added to Cart, Submitted Form, Made a Purchase.

The links between these nodes would show you, for instance, just how much traffic from Paid Ads went to the Product Page and then resulted in a purchase. A thicker line from Paid Ads to the Product Page than from any other source shows you what's working best at a glance.

Why Use a Sankey Diagram in Power BI?

While Power BI has plenty of built-in charts, a Sankey visual offers some unique advantages for specific types of data:

  • It tells a story: It's incredibly effective for illustrating processes, letting stakeholders see precisely where volume is coming from and where it's going. It's often more intuitive than a stack of bar charts or a complex table.
  • Highlights major contributors: The visual weight of the links immediately draws attention to the most significant paths in your process, helping you identify bottlenecks or powerhouse channels without having to analyze rows of numbers.
  • Shows distribution and drop-off: It's perfect for funnel analysis, where you can see exactly where users or leads are dropping off at each stage of a process.
  • Manages complexity: It can represent multi-stage processes in a single, consolidated view, making it easier to understand interconnected data than many other chart types.

Getting Your Data Ready for a Sankey Diagram

This is the most important step. A Sankey diagram needs your data to be structured in a very specific way. If your data isn't in this format, the visual won't work correctly. You need three key columns:

  1. Source: The starting point or "from" category.
  2. Destination: The ending point or "to" category.
  3. Value (or Weight): A number representing the quantity of the flow between the source and destination.

Imagine you're tracking website sessions. Your raw data might look jumbled, but you need to shape it into a table that looks like this:

Example: Website Traffic Flow Data

Notice how "Homepage" appears in both the Source and Destination columns. This is key. Each row represents a single A-to-B link and its associated value. You might need to use Power Query to unpivot or transform your raw data to get it into this format.

Step-by-Step: Creating a Sankey Diagram in Power BI

Unlike a standard bar or line chart, the Sankey diagram is not a native Power BI visual. You'll need to import it from AppSource, Microsoft's marketplace for Power BI visuals. Don't worry, it's free and easy.

Step 1: Get the Sankey Visual from AppSource

  1. In Power BI Desktop, look at the Visualizations pane on the right. Below the standard visuals, click the three dots (...) and select Get more visuals.
  2. A marketplace window will pop up. In the search bar, type "Sankey".
  3. Several options will appear. The one simply named Sankey and certified by Microsoft is a reliable and popular choice. Click Add.
  4. After a moment, you’ll see a message that the visual was imported successfully. Power BI will then add a new icon of the Sankey diagram to your Visualizations pane.

Step 2: Add the Sankey Visual to Your Report Canvas

Now that it's available, click on the new Sankey icon in the Visualizations pane. This will add a blank Sankey chart template to your report canvas.

Step 3: Map Your Data Fields

With the blank visual selected, look back at the Visualizations pane. You'll see several fields where you need to drag your data columns. This is where your careful data prep pays off.

  • Drag your Source column (e.g., "Source") to the Source field well.
  • Drag your Destination column (e.g., "Destination") to the Destination field well.
  • Drag your Value column (e.g., "Sessions") to the Weight field well.

As soon as you drag the last field, the visual will populate with your data, showing the nodes and the weighted links connecting them.

Step 4: Customize and Format Your Sankey Diagram

The default Sankey is a great start, but you'll want to format it for clarity and style. Select the visual, then click the paintbrush icon (Format your visual) in the Visualizations pane.

Here are some key formatting options:

  • Links: This is where you can assign colors to each flow. You can also turn on data labels for the links to show the exact values on the chart itself. It’s also where you can manage how the diagram handles circular references in your data under "Cycles display options".
  • Nodes: Here, you can adjust the width of the nodes themselves and change the color of the data labels appearing on the nodes.
  • Scale settings: If you have very small values that are hard to see, you can adjust the scaling to make them more visible, or enable log scale if you have a wide range of values.
  • General: This is where you can change the title of your chart, add a border, or change the background.

Spend some time here. Thoughtful coloring and labeling can transform a good chart into a great one that tells a clear story.

Common Challenges and Pro Tips

As you build, you might encounter a few common issues. Here’s how to handle them.

Problem: My chart is too crowded or messy.

Solution: This often happens when you have too many small flows. Before bringing the data into Power BI, use Power Query to group smaller categories. For example, if you have ten traffic sources where the bottom eight contribute less than 2% of traffic combined, group them into a single category called "Other." This simplifies the visual immensely.

Problem: The names in my Source and Destination columns don't match exactly.

Solution: Sankey diagrams are case-sensitive. "Homepage" and "homepage" will be treated as two different nodes. Use Power Query to clean your data first. Simple steps like Trim, Clean, and Transform to Lowercase on both your Source and Destination columns can prevent many headaches.

Problem: I have a self-referencing relationship (e.g., users go from Homepage back to Homepage).

Solution: In the Format pane, under Links, there’s an option to "Provide a link for the nodes on itself." Enabling this will draw a link that loops back to the same node, which can be useful for visualizing things like repeat visits or internal recalculations.

Final Thoughts

Sankey diagrams are a fantastic tool for visualizing flow and distribution in a way that's both insightful and easy to digest. Once you get your data structured into the required source, destination, and weight format, creating a powerful Sankey chart in Power BI is a straightforward process that can elevate your reports to a new level.

And while building visuals like a Sankey diagram in BI tools is a powerful skill, we know the real bottleneck is often getting your data connected, cleaned, and organized in the first place, especially across multiple platforms. That's why we created Graphed. It automates this entire process by connecting directly to your sales and marketing sources (like Google Analytics, Shopify, and Salesforce), allowing you to ask for insights in plain English. Instead of configuring fields and settings, you can simply ask, "show me a funnel of user traffic from organic search to checkout," and get an answer instantly, helping you move from raw data to real insights in seconds.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.