How to Make a Sankey Diagram in Power BI with AI

Cody Schneider

Ever wondered exactly how customers navigate through your marketing funnel or how users flow from one page of your website to the next? Visualizing this kind of movement can feel complicated, but a Sankey diagram makes it simple. This article will show you how to create a clear, insightful Sankey diagram in Power BI to track flow and uncover hidden patterns in your data.

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 flow quantity. In simpler terms, it’s a brilliant way to visualize how something moves from one stage to another. The thicker the band, the larger the amount.

Think of it like this: if you want to see the journey of your website traffic, a Sankey diagram can show you:

  • The primary sources of your traffic (e.g., Google, Facebook, Direct).

  • Which landing pages that traffic goes to.

  • How users then move from those landing pages to other pages, like product pages or a blog.

  • Where they eventually drop off or convert.

This visualization excels at showing the many-to-many relationships between different categories. You can instantly spot the most important paths and identify potential bottlenecks or opportunities. Marketers use them to visualize marketing funnels and ad spend allocation, sales teams use them to track lead progression through a pipeline, and finance teams can use them to see how budgets are distributed across departments.

Getting Your Data Ready

Before you can build a stunning Sankey diagram, your data needs to be in the right format. This is the most important step, and getting it right will save you a lot of headaches later. A Sankey diagram requires three specific pieces of information:

  1. Source: The starting point or original category.

  2. Destination: The endpoint or the category something flows to.

  3. Value: A numerical measure of the flow (e.g., number of visitors, dollar amount, number of leads).

Your data should be structured in a simple table with at least these three columns. For example, if you're analyzing website traffic flow, your data might look like this:

Source

Destination

Sessions

Google Search

Homepage

9,500

Facebook Ads

Landing Page A

4,200

Email Campaign

Landing Page B

3,100

Homepage

Product Page

5,600

Homepage

Blog

2,100

Landing Page A

Product Page

1,800

Landing Page B

Checkout

950

Product Page

Checkout

3,200

Before importing this data into Power BI, quickly double-check for any inconsistencies. Make sure the names in your Source and Destination columns are spelled identically (e.g., "Homepage" should always be "Homepage," not "Home page"). A little bit of cleanup here ensures your diagram will be accurate and easy to read.

How to Create a Sankey Diagram in Power BI: The Step-by-Step Guide

Power BI doesn't include the Sankey diagram as a default visualization, but you can easily add it from the marketplace of custom visuals, called AppSource. Here’s how to build one from scratch.

Step 1: Get the Sankey Custom Visual

First, you need to add the Sankey chart type to your Power BI toolbox.

  • In Power BI Desktop, look at the Visualizations pane on the right-hand side.

  • Click the three dots (...) at the bottom and select Get more visuals.

  • This will open the AppSource marketplace. In the search bar, type "Sankey".

  • You'll see a few options. A popular and reliable choice is the Sankey diagram visual by Microsoft. Click Add to import it into your Power BI Desktop file.

Once added, you'll see a new icon for the Sankey diagram in your Visualizations pane, ready to use.

Step 2: Load Your Data into Power BI

If you haven't already, you need to get your prepared data into Power BI.

  • On the Home ribbon, click Get Data and choose the source of your file (e.g., Excel workbook, CSV, SQL server).

  • Select your file and the specific table you prepared. Click Load to import it.

Step 3: Add the Sankey Visual to Your Report

Now for the fun part. Click on the Sankey diagram icon you just added to your Visualizations pane. This will create a blank placeholder for the visual on your report canvas. You can drag the corners to resize it.

Step 4: Map Your Data Fields

With the blank Sankey visual selected, look back at the Visualizations pane. You'll see several fields where you need to drag your data columns. This is where you tell Power BI what to show.

  • Drag your Source column (e.g., Source) into the Source field.

  • Drag your Destination column (e.g., Destination) into the Destination field.

  • Drag your Value column (e.g., Sessions) into the Weight field. This field name might vary slightly depending on the specific custom visual you chose, but 'Weight' or 'Value' is common.

As soon as you do this, your Sankey diagram will spring to life on the canvas, showing the flow based on your data!

Step 5: Customize and Format Your Diagram

The default diagram is good, but you can make it great with some formatting. Select your Sankey visual, then click the paintbrush icon (Format your visual) in the Visualizations pane.

Here are a few key settings to tweak:

  • Links: You can change the color of the connection bands. You can set them to have a different color for each source, which helps visually group the flows. You can also turn on data labels to show the value of each flow right on the band.

  • Nodes: Customize the width and color of the vertical bars (the nodes) that represent each stage.

  • Labels: You can adjust the font size, color, and positioning of the category labels to improve readability.

  • Title: Always give your chart a clear, descriptive title under the General options so everyone knows what they're looking at.

Play around with these settings until your diagram is clear, visually appealing, and tells a compelling story.

Using AI for Faster Visualizations

The manual process in Power BI is powerful and perfect for anyone comfortable inside the tool. But what if you’re not a data analyst? Or what if you just need a quick answer without hunting for custom visuals and mapping fields?

This is where new AI-powered analytics tools are changing the game. Instead of building the visual step-by-step, you can simply ask for it in plain English. You don’t need to know which fields to drag and drop or even what constitutes a "source" and "destination" in a technical sense. You just need to know the question you want answered.

For example, you could type a prompt like: “Show me the flow of website visitors from source medium to landing page last month as a Sankey diagram.”

The AI understands the intent behind your question, identifies the necessary data fields from your connected data sources (like Google Analytics), structures it correctly, and generates the Sankey diagram for you instantly. This approach significantly lowers the barrier to getting insights. A marketer can directly ask for a funnel analysis of their Facebook Ads campaign, or a founder can ask for a visual of sales pipeline velocity, all without needing to become a Power BI expert overnight.

The real benefit is speed and exploration. Once the first chart is created, you can ask follow-up questions to dig deeper, such as "Now only show me the flow for mobile users" or "What percentage of traffic from Google converted?" This conversational approach turns data analysis from a structured, rigid process into a fluid exploration, allowing anyone on the team to find answers and make better decisions.

Best Practices for Effective Sankey Diagrams

Whether you build your Sankey manually or with AI, here are a few tips to make sure it's as effective as possible:

  • Don't Overcomplicate It: Sankeys are best when they tell a clean story. If you have too many nodes or stages, the visual can become a tangled mess. Try to limit your diagram to 3-5 key stages.

  • Use Color Thoughtfully: Use color to guide the viewer's eye. Highlighting a specific path you want to discuss or using consistent colors for similar categories makes the chart more intuitive.

  • Maintain Node Order: If your flow follows a logical sequence (like a funnel), try to arrange the nodes in that order from left to right to make the journey clear.

  • Tell a Story: Your Sankey diagram should have a purpose. Use a clear title and, if necessary, a short description to explain the key takeaway. Are you showing a bottleneck? A successful campaign path? Make the story obvious.

Final Thoughts

Creating a Sankey diagram in Power BI is an incredibly effective way to visualize flows within your business, whether you're tracking customer journeys, budgets, or sales processes. The standard method offers deep customization for data analysts, while emerging AI tools provide a dramatically faster, more intuitive path to get the same powerful insights.

At Graphed we built our entire platform around the idea that getting data-driven answers should be as simple as asking a question. We connect directly to your marketing and sales platforms - like Google Analytics, Shopify, and Salesforce - and let you use natural language to create real-time reports and dashboards. You can ask for a Sankey diagram, a sales trendline, or a campaign ROI report, and our AI builds it in seconds, skipping the manual setup so you can get straight to the insights that matter.