How to use SANKEY Charts in Power BI // Beginners Guide to Power BI in 2020

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'm going to show you guys how you can use the sankey diagram in power bi to visualize your data distribution with a very easy to understand flow diagram i'm going to go through the process step by step so you can follow along and do it yourself all of that and more so without further ado let's get started hi my name is fenan and welcome to the solutions abroad youtube channel where i focus on teaching beginners the wonderful world that is power bi i upload new videos every week so make sure you hit that subscribe button and the bell icon to get notified when a new one is out a sankey diagram is a type of flowchart diagram that shows the movement of your data from a source to a destination here's an example of a sankey diagram that i prepared for this video it visualizes the number of tickets that we've created in different years and how is distributed against status and department the width of the flows gives you a general idea of the distribution of your data and clicking on any of the categories highlights the flow of data for it which helps you focus on that area if you want to do some root cause analyses without losing sight of the bigger picture now let's look at the data that we want to visualize with this chart i generated a mock data set of tickets with some details such as when the ticket was created their priority level status and which department they belong to it's a fairly simplistic data set but i think it best represents the type of data that you will most likely be working with in the real world now getting data like this your first instinct would be to start using bar charts and pie charts to start slicing and dicing your data something similar to what i made here in this page and this is a perfectly valid way for you to visualize your data there's nothing wrong with using these to visualize your ticket's data so think of the sun key diagram as just an alternative way to visualize your data now how do we start using it in power bi well first it doesn't come out of the box with power bi meaning that it's a custom visual created by the power bi community so you're going to need to head to appsource and look for sankey once it's ready you'll see a new visual available for you on your power bi desktop i already have it installed as you can see so i won't add it again let's create a new page and add this new sankey visual you see that it asks for a source destination and weight it also asks for labels but we'll ignore those for now let's focus on these three the source is where your data will come from and the destination is the field where the data will go to and the weight is the size of the sankey arrow or the flow so at a minimum we need three fields to work with the sankey diagram let's flip back to the sankey diagram that i already created i'm gonna click on one of the data arrows so we can focus on it in order to create this specific arrow we need to have a row in a table that has three fields that i listed out earlier the source is 2019 the destination is open and the weight which is the count of tickets in that category each of these arrows or flows need to have a row in the table specifying their source destination and weight let's look back at the data sets we have it gives us details on a ticket level with categories for each one the sign key diagram can't really work with this format so we'll need to create a version of this table with the format that we need in order to do that we'll go to the data view and hit new table this allows us to generate a table using dax formulas we'll write a dax formula called summarize to create the table that we need let's name our table sign key to equals then summarize the tooltips provide handy tips on what this function needs and it needs a few columns so let's go through them one by one first it asks for a table let's provide our table name ticket next it asks for the groupings this is how we'll summarize our table by for now let's put in create a date comma and then priority and then another comma you can add as many groupings as you want here but in our instance we'll keep the groupings to just two if you close this formula and hit enter you'll see that it generates a table with two columns created date and ticket priority these two columns are what we'll use as our source and destination you'll see what i mean shortly we'll go back to our summarize since we weren't finished there hit comma and now we'll put the word count here surrounded by double quotes comma again and we use the count function to count the number of ticket ids let's close this and hit enter now a new column count is added now to our table from our code we simply wrote the name count and the values to summarize in that field in this case we wanted to count the number of tickets for each of these categories now we have the minimum fields that we need for our sankey diagram so let's go back to our report view and drag these fields into the chart create the date at source ticket priority at destination and count to the weight make sure that the fields are not summarized and they are in the right data type so text that now gives us a basic sign key diagram showing the distribution of data between years and ticket status we can see that for the most part tickets are classified as medium in both years but what if we wanted to see their status how does this distribution look like between ticket status and ticket priority it means for our sankey diagram we need to create a new layer which in essence is just having the priority field as a source and the status as a destination from the table perspective all we need to do is to create another summarize function and combine the two results using the union function let me show you what i mean by that let's go back to our table and copy the summarize function we just created let's delete it then type union you can see it asks for multiple tables here to combine so we'll paste our first summarize table here then shift enter that brings you to a new line type comma and then let's paste again the summarize shift enter again and close that union function then let's go back to our second summarize table we need to replace the created date to ticket priority and the ticket priority to ticket status if you hit enter you'll see your sankey diagram updates automatically with the new layer so what happened let's look at the table to find out if i switch to the data view you'll see that there are more data in the rows but still the same number of fields first we created a summary table between the created date and ticket priority you can see that it's the first six rows in that table then we created another summary table but this time between ticket priority and ticket status these two summary tables were then combined on top of each other this kind of format makes it really easy for you to add more layers if you need to for example if we wanted to create another layer to show the distribution of ticket statuses to different categories from here you'll need to add another summarize table between ticket status and category when you hit enter and go back to your sankey chart you'll see that the new layer is added to your chart automatically i hope that helped you understand how to use sankey charts in power bi it's such a powerful visualization tool that not a lot of people really use so it's such a shame that i don't see it very often so what do you think will you start using sankey diagrams from now on let me know in the comment section below give this video a like if it helped you it's the best way to let me know that you enjoyed this type of content get in touch using the social media links that i included in the description box below and thank you so much for watching guys see you again on the next one
Info
Channel: Solutions Abroad
Views: 1,944
Rating: 4.9298244 out of 5
Keywords: solutions abroad, power bi, powerbi, power bi tutorials, power bi for beginners, beginners guide to power bi, power bi 2020, data analytics, dax, data modelling, data visualisation, business intelligence, power bi dax, sankey diagram, sankey power bi, summarize power bi, union power bi, sankey chart power bi, data transformation power bi, dax power bi, how to use sankey power bi, power bi custom visuals, power bi sankey custom visual, sankey visual power bi, pbi sankey
Id: AK2KsJm_r2o
Channel Id: undefined
Length: 8min 2sec (482 seconds)
Published: Wed Dec 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.