Using a Sankey diagram
The Sankey diagram displays how quantities are distributed among items between two or more stages.
2. Add a Sankey diagram
Choose the Data Visualization or Re-Visualize option from the toolbar and select Sankey Diagram.
Drag one or more hierarchies or hierarchy levels to Rows in the Data Analysis Panel. Each hierarchy will be displayed as another level if you select multiple hierarchies, or you can select multiple levels of a hierarchy.
In our example, we have selected a multi-level hierarchy. To visualize multiple levels of a hierarchy at once, click to edit it in the Data Analysis Panel and set the Top Level and Level to a range of levels, or drag a lower level from under the hierarchy in the Explore window.
The diagram is displayed in a river-like arrangement based on the hierarchies and their levels. Each value in the hierarchy is displayed as a rectangle called a "node".
An essential part of a Sankey diagram is a measure that determines the widths of the links between each node. Drag a measure (numeric data) to Measures in the Data Analysis Panel to visualize its quantities flowing between the items.
2.1. Display custom flow
If your data has information about a quantity transferring between pairs of items, the Sankey diagram can visualize these items according to the connections in your data instead of displaying a hierarchical structure.
By default, the hierarchies you've added are assigned under Source Name in the Data Analysis Panel's Visualization tab. Assigning a Target Name will display the custom flow between each source-target pair.
We are using a dataset containing source-target pairs to describe the links in the diagram between pairs of nodes (displayed as rectangles). If you want to customize or display further information about individual nodes based on your data, you will need a second metric set providing a row of information for each node rather than for each pair of nodes.
Click Metric Set in the Data Analysis Panel, and then click Add New or + button.
Drag a hierarchy or column of data corresponding with the values already used as sources and targets onto Rows. You can then add additional measures and hierarchies and use them in tooltips, for colors or other visualization options in the Visualization tab.
To display the links in different colors according to data, assign it under Color in the Data Analysis Panel's Visualization tab in the Links section.
One or more color rules are applied to the links in the diagram. You can modify the the color rules by clicking the brush icon next to Color, or by going to the Look tab of the Properties window. These settings work the same way as in other visualizations, such as charts.
To change what measure is used to determine the widths of the links, remove the measure assigned under Width in the Links section if there is one and add the measure of your choice.
4. Change node color
To display the nodes in different colors according to data, assign it under Color in the Data Analysis Panel's Visualization tab in the Nodes section.
As with the links, one or more color rules are applied to the nodes in the diagram, and can be customized in the Properties window.
5. Change labels and tooltips
In the Text tab of the Properties window, you can customize the Label Text and Tooltip Text properties for both the links and the nodes.
These properties accept regular text, as well as keywords such as [Member] and [Level] for the hierarchy member and level captions, respectively. For additional information about available keywords, refer to the Formatting Text article.
As a shortcut for applying the proper keyword, you can use the Visualization tab in the Data Analysis Panel. For example, assign data under Label in either the Nodes or Links section to display it as a label over each node or link.
Click the brush icon next to the Label heading to open the relevant properties. The keyword (e.g., [OrderQty]) has already been added to the Text property.