Power BI Sankey Diagrams: Prepare Flow Data and Check What Links Mean
A Sankey diagram represents flows between categories or stages with nodes and links; link width usually encodes the amount flowing. It is useful for allocations among multiple sources and destinations or paths across stages, but many connections can make crossings and curves difficult to follow. In Power BI, a Sankey is commonly added as an AppSource custom visual. Prepare data with one source, destination, and value per connection, then check the visual publisher and its field requirements. [Google Charts: Sankey data structure](https://developers.google.com/chart/interactive/docs/gallery/sankey) · [Microsoft: Import a Power BI visual](https://learn.microsoft.com/en-us/power-bi/developer/visuals/import-visual)
Power BI Sankey Diagrams: Prepare Flow Data and Check What Links Mean
A Sankey diagram represents flows between categories or stages with nodes and links; link width usually encodes the amount flowing. It is useful for allocations among multiple sources and destinations or paths across stages, but many connections can make crossings and curves difficult to follow. In Power BI, a Sankey is commonly added as an AppSource custom visual. Prepare data with one source, destination, and value per connection, then check the visual publisher and its field requirements. Google Charts: Sankey data structure · Microsoft: Import a Power BI visual
When is a Sankey the right chart?
Use a Sankey to answer “where does a quantity go, and how much?” Nodes are categories or stages; links connect two nodes; a weight records the flow amount. Examples include allocating energy supply to homes, industry, and losses, or showing how website visits move between pages. Sankeys can show many-to-many mappings and paths through several stages. Google Charts: Sankey use and data
If the main question is to rank exact values, a bar chart is often clearer. Link width emphasizes routes, but small differences between thin links are difficult to judge. With many flows, crossings, long curves, and overlapping labels can clutter the view. Sankey readability research discusses dense crossings as a problem when data grows. It does not establish a universal node-count threshold; check whether readers can find the important links in your actual report. Xu et al., 2023: NeatSankey readability study
Shape the flow data first
The simplest input has one row per connection:
| From | To | Weight |
|---|---|---|
| Solar | Residential | 30 |
| Solar | Industry | 15 |
This matches Google Charts’ documented source, destination, and weight structure. Power BI custom visuals can use different field names and roles, so check the chosen visual's description and sample report. Google Charts: data format · Microsoft: Power BI visual sample reports
Define the grain and units before modeling. Usually, a row represents one directed source-to-destination connection for a given period, region, or product filter. If multiple fact rows repeat a connection, aggregate to the intended grain before adding the visual. Conversely, do not remove repeated-looking rows if each is a real transaction or flow. Decide from source keys and measurement units whether they are duplicates or separate events.
Add a custom Sankey visual in Power BI
These steps apply to Power BI Desktop or a Power BI Service report you can edit. Power BI can import custom visuals from AppSource in addition to its built-in visuals. Field roles and options vary by publisher.
Prepare source, destination, a nonnegative flow measure, and any period or category fields. Record the meaning and unit of each row and check for duplicate aggregation.
In the report, open the ellipsis in the **Visualizations** pane and choose **Get more visuals**. Find a Sankey visual in AppSource. Review its publisher, description, license, certification badge, and sample report. Microsoft points to sample reports as a way to inspect how a visual works. [Microsoft: Get an AppSource visual](https://learn.microsoft.com/en-us/power-bi/developer/visuals/import-visual)
Select **Add** for the visual you have evaluated, then **OK** after import. Select its new icon to place it on the report canvas. Your organization may require administrator-approved visuals. [Microsoft: import steps and organization visuals](https://learn.microsoft.com/en-us/power-bi/developer/visuals/import-visual)
Map source, destination, and flow amount to the field roles defined by the publisher. For multiple stages, consult the visual's documentation for how each link's stage is represented. Do not guess from a field's name if its role is unclear.
Apply filters and units, then validate the result. Check that link widths correspond to the intended measure, totals change as expected under filters, and node labels represent the intended categories. If supported, compare tooltips or exported link values with the source table.
The expected result is nodes connected by directed links whose relative widths reflect the selected flow measure. Direction indicators, colors, stage limits, and tooltip behavior vary across visuals. Check the visual's current listing for certification, updates, permissions, and license terms. Certification means the visual passed specified code requirements and testing; it does not mean Microsoft authored it or guarantees its fit for your report. AppSource visuals may have different license models and may update. Microsoft: custom visual certification and licensing · Microsoft: what certification checks
Reconcile a fictional energy example
The following values are invented to explain the structure, not real energy data. The illustrative unit is an energy unit; 100 units are allocated to three uses.
| From | To | Weight |
|---|---|---|
| Solar | Residential | 30 |
| Solar | Industry | 15 |
| Solar | Losses | 5 |
| Wind | Residential | 10 |
| Wind | Industry | 18 |
| Wind | Losses | 2 |
| Grid supply | Residential | 5 |
| Grid supply | Industry | 10 |
| Grid supply | Losses | 5 |
Outgoing totals are Solar 50, Wind 30, and Grid supply 20, for 100. Incoming totals are Residential 45, Industry 43, and Losses 12, also 100. Losses are explicit, so this example reconciles. For real energy or material flows where conservation is expected, compare inflow and outflow at each stage. If there are external inputs or outputs, inventory changes, or different measurement boundaries, show them as separate nodes or explain them rather than hiding them as missing links.
Do not read aggregated links as individual journeys
Each link describes an aggregated connection between two nodes. Suppose one stage shows A→B = 40 and the next shows B→C = 25. Those values alone do not tell you how much of the first 40 followed the exact A→B→C path. When several entities merge at B and then split, aggregated links do not preserve which upstream and downstream connections belong to the same entity. To make claims about a user- or transaction-level path, the data must retain identifiers across stages, subject to privacy and disclosure rules. Do not claim that an individual followed a path based only on aggregated links.
Troubleshooting
**Links are missing or connect the wrong nodes:** check the source/destination roles, blanks or invalid categories, and whether the selected visual supports multiple stages.
**Node totals do not match the input:** verify row grain and aggregation level. Check whether repeated fact rows create repeated links and how the visual sums or counts under filter context.
**Same-named nodes merge unexpectedly:** if identical labels mean different stages, check whether the visual distinguishes stage-specific nodes. If needed, create unique labels that include a stage identifier.
**Cycles cause errors or an unusable layout:** check the chosen visual's documentation. Google Charts documents that its implementation will not render cyclical data; this does not establish the behavior of every Power BI visual. For a cyclic system, also inspect the stage flows in a table or another network view.
**Thin links and crossings are hard to read:** group unnecessary categories, filter to important links, or pair the Sankey with a bar chart or table. If links are hidden or grouped, state the scope and aggregation rule.
**You need to show a negative change:** link width normally encodes a nonnegative magnitude. If net change is the question, define increases and decreases separately or use a bar chart, and check how the visual handles negative values.
A Sankey is suited to seeing flow origins, destinations, and relative magnitude. For small differences in exact values or rankings across many categories, pair it with a bar chart. State the units, aggregation grain, and filter scope; validate the chosen Power BI visual's roles, certification, license, and limits using its documentation and sample report. This guide uses Microsoft and Google documentation and the Xu et al. study reviewed on November 18, 2026; it does not guarantee the current behavior of any particular AppSource product.