What is the PowerGraph Sankey?
PowerGraph Sankey is an advanced custom visual for Microsoft Power BI that allows you to visualize the flow of data from one state or category to another. It’s ideal for illustrating complex processes, resource allocation, user journeys, or any system where understanding magnitude and distribution across multiple stages is crucial.
Key Benefits of PowerGraph Sankey:
- Intuitive Flow Visualization: Clearly see how quantities or values are distributed and transitioned.
- Enhanced Data Storytelling: Add more context to your nodes with counts and percentages.
- Improved Readability: Optimized label placements and powerful sorting options make complex Sankeys easier to understand.
- Dynamic Analysis: Leverage Power BI’s filtering and cross-filtering capabilities with correctly modeled data.
Key Features
PowerGraph Sankey includes all standard features you expect from a Sankey diagram, plus significant enhancements:
Standard Features:
- Customizable node colors, width, and padding.
- Adjustable link opacity and coloring options.
- Basic label formatting (font, size, color).
- Support for tooltips to display additional information.
- Ability to handle self-loops or circular references (Cycles Display).
- Options for scaling and preserving node order.
New & Enhanced capabilities:
- Advanced Node Labels:
- Display Count: Optionally show the absolute count for each node, displayed in parentheses (e.g., “Node A (1500)”).
- Display Percentage: Optionally show the percentage value for each node relative to the total flow through that stage. Note: Percentages are not displayed on the initial (source-most) nodes.
- Powerful Sorting Capabilities:
- Node Sorting: Sort nodes within each column by their value or name, in ascending or descending order for the entire chart.
- Flow Sorting: Sort the individual flows (links) connecting nodes by their value, in ascending or descending order.
- Optimized Final Node Labels: Labels for the final (destination-most) nodes are now intelligently placed to the right of the nodes, improving clarity and reducing overlap.
- Dynamic Filtering Ready: When your data is modeled correctly, PowerGraph Sankey fully supports Power BI’s interactive filtering and cross-filtering features.
Importing PowerGraph Sankey
- Download the PowerGraph Sankey visual file (.pbiviz) from Microsoft AppSource or PowerGraph.com.
- In Power BI Desktop, open your report.
- In the “Visualizations” pane, click the three dots (“…”) and select “Import a visual from a file.”
- Navigate to and select the .pbiviz file you downloaded.
- Click “Open.” The PowerGraph Sankey icon will appear in your Visualizations pane.
Adding the Visual to Your Report
- Click the PowerGraph Sankey icon in the Visualizations pane to add it to your report canvas.
- Resize the visual as needed.
Configuring Your Data
To create a Sankey diagram, you need to provide data in a specific structure. Drag the appropriate fields from your “Fields” pane to the visual’s field wells:
- Source: The starting point of the flow (e.g., previous stage, origin category).
- Destination: The ending point of the flow (e.g., next stage, target category).
- Weight: The numerical value representing the magnitude of the flow between the Source and Destination (e.g., count, amount, volume).
- (Optional) Tooltip Data Fields: Add any additional fields here to display more information when a user hovers over a node or link.
Data Structure Best Practices
For optimal performance and to enable dynamic filtering:
- Ensure your data is in a tabular format where each row represents a distinct flow from a source to a destination with an associated weight.
- Avoid circular references in your primary flow path if you want a clear multi-stage Sankey, or use the “Cycles Display” options if cycles are intentional.
- Clean data leads to clearer visualizations. Ensure consistency in naming for sources and destinations.
Formatting Your PowerGraph Sankey
Customize the appearance and behavior of your Sankey diagram using the “Format visual” pane in Power BI.
General Settings
- Nodes:
- Node Width & Padding: Adjust the width of the nodes and the vertical space between them.
- Node Color: Set default node colors or use data-driven colors if your data model supports it.
- Links:
- Link Opacity: Control the transparency of the flow links.
- Coloring Options: Choose how links are colored (e.g., inherit from source node, destination node, or a gradient).
- Labels (General):
- Font: Select font family, size, and color for node labels.
- Units: Specify display units for values (e.g., Auto, Thousands, Millions).
- Decimal Places: Control the number of decimal places shown for values.
Node Label Display Options
- Show Percentage:
- Toggle: On/Off
- When On, displays the percentage contribution of the node.
- For intermediate nodes, this is typically the percentage of the total flow passing through that specific node relative to the total flow entering the preceding stage or the overall total, depending on the calculation logic inherited/defined.
- Important: Percentages are not displayed for the initial (source-most) nodes in the diagram.
Sorting Capabilities
- Node Sorting:
- Sort Nodes By: Dropdown menu.
- Value: Sorts nodes within each column based on their aggregate weight.
- Name Dropdown menu.
- Ascending
- Descending (This applies to the entire chart for consistent node ordering).
- Flow Sorting:
- Sort Flows By: Dropdown menu.
- Value: Sorts the individual links/flows emerging from or entering a node based on their weight.
- Flow Sort Direction: Dropdown menu.
- Ascending
- Descending
Advanced Features & Tips
Dynamic Filtering and Cross-Filtering
When your data model is set up correctly in Power BI (e.g., with proper relationships), PowerGraph Sankey interacts seamlessly with other visuals and slicers. Clicking on a node or link in the Sankey can filter other visuals, and selections in other visuals can filter the Sankey, allowing for dynamic exploration of your data.
Handling Large Datasets
While PowerGraph Sankey is optimized for performance, very large datasets (many unique nodes or links) can impact rendering speed. Consider:
- Aggregating data to higher levels if appropriate.
- Applying filters to reduce the scope before rendering the Sankey.