Skip to main content

All about Sankey Charts

Let's consider a situation- you have 4 fields and you want to depict the flow with a help of visuals. The first thought can be to use a table or matrix in Power BI. It can depict the data but how about the intuitiveness? The solution for such scenarios is Sankey Charts which can help you to show different fields and the flow associated with them.

As a beginner in the BI world anyone can question- Is there a need for a Sankey chart when you already have a pool of options? Yes, we do need such charts if you are trying to visualize a process with respect to a particular field.

Protip- Sankey Charts are not available in your default library. You need to get it from the online library and keep in mind to only add certified visuals.

So, enough of the introduction let's showcase how the Sankey chart works. I am considering the SampleSuperstore dataset. The use case for the first visual is we are going to show the flow between Region and Category. The flow size will be governed by the amount of profit (putting the profit in the weight).


We have put the region in the source and the category in the destination. If you select any of the regions the flow will get highlighted as in the above-mentioned image. You can see the profit associated with different categories.

But still the visual doesn't look so intuitive. One of the reasons is the same or default color scheme of the flow. To change the color of the flows go to formatting of the visual and under the data link labels you can see the links. You can pick the color of your choice.


Protip- If you critically observe the above-mentioned image you can see I have picked the same color with different shades for a particular region. It just makes the visual more tidy and easy to spot a particular region.

Let's take a step forward and see the interactivity of such charts. We are creating two charts one is the Sankey chart with source as segment and destination as a category. Profit is in the weight. For another visual, we are considering profit and sales with every subcategory.


Now, if I select the flow Corporate to Technology in the Sankey chart then it will filter the clustered bar chart as well. 


Isn't it interesting? As a BI analyst, I always keep the Sankey chart in my visual arsenal but it has a few limitations too. It can be cumbersome if either the source or the destination has more than 6-7 values. Consider you have 10 categories and 10 segments. In such cases, you can't decipher every flow in the visual. Also, what if every flow size has values of the same range. For instance, if the profit values are between 200k and 250k for all segments and categories then the visual becomes counter-intuitive in nature. 


Thanks for Reading  Let's connect on  LinkedIn. For more such blogs do follow us.

Comments

Popular posts from this blog

Ultimate Beginners Guide to DAX Studio

There are zillions of external tools available with Power BI but DAX Studio is one of the most commonly used tools to work with DAX queries. It is a perfect tool to optimize the DAX and the data model. In this blog let's shed some light on the basic functionalities that can take your report to the next level. ARE YOU READY?  To start you will need the latest version of the DAX Studio. You can download it from their website . Don't worry you don't have to pay for the license. Fortunately, DAX Studio is a free tool As a BI Developer, I am using DAX Studio regularly. Based on my experience I use it for several purposes but in this blog, I will highlight the most common ones. Extracting a dump of all the measures used in your PBIX. Why do we need to do this? It can be used for documentation purposes also sometimes we try to reuse the DAX and such a dump comes in handy in this scenario. How to achieve it? Open the DAX Studio it is located under the external tools once you open t

Append v/s Merge in Power BI

Let's discuss another problem of the week. As a Power BI user, there are times when you want to combine queries. What are the ways to do so? In most cases, you can attain it by using either append or merge and both serve different purposes. Let's understand what do these terms mean in Power BI and how they are functionally different from each other.  It is quite common to get data from various sources and you need to combine those data depending on a particular column which is common in both tables so that you can add extra information or column to your big table. In such cases, we use merge queries. How to perform merge queries? For instance, I am considering Sample Superstore data and we will merge the returns table to the order table. You will find both merge and append in the home tab in extreme right in the power query editor. ProTip - You will find two options when you click on the drop-down in merge which are merge queries and merge queries as new. When you use merge que

Use Relationship in DAX

Data modeling is an essential part of creating perfect visuals. While creating complex data models there can be a case where you can find an inactive relationship represented by dotted lines and it occurs because you already have an active relationship between the two tables. But as a developer, you need to use both the relationship. How can it be done? You can use "Use Relationship" in such cases. Use relationship can be added to your DAX and act as a modifier or enhancer for calculation. It activates the inactive relation. But make sure you have an inactive relationship in place before using the use relationship function. Let's see how it works on Sample Superstore data. In my fact table I have two dates- Order date and Ship date. I am making the two relations between my date table and fact table. The relation between the sample superstore (date) to date table (date) is active while the relation between the sample superstore (ship date) to date table (date) is inactive