Creating Flexible Tornado/Butterfly's Chart having images Using Power BI Matrix Visual
Ok, so I have been struggling in creating a Tornado ( Butterfly) chart with images or icons are the category labels in Power BI. Know if you are wondering what is a Tornado chart, then you are missing a cool visual.
Lets then add Our data to the visual. We will put our "CAT" column in the rows field of the matrix visual, The we will add three columns in the values placeholder. with the below order.
Lets complete the butterfly, by setting the right wing. To do so, we need to Branch Field in the values placeholder and add a data bar. This time we will make the bars direction from the "left to right".
This is not complete yet. the bars are stacked on top of each other. let add some space. To do so we will enable the horizontal gridlines and change their colors to white.
We can align the number to the middle. This can be done from the format pane. Just select the specific column that you want to align. the select the middle alignment icon. In my case I did this for the "Online" and "Branch" Columns.
You may want to change the colors of the numbers. You can do that in the Text color option in the above step.
This is not bad since we started with a matrix visual and ended up with Tornado chart. Equipped with the flexibility of Matrix visual and your creativity , your Tornado chart will definitely standout.
A Tornado ( Butterfly) chart is usually used to compare two categories in an easy way. Most BI tools supports this type of visuals either out of the box or by adding a custom visual. Microsoft Power BI requires importing a Tornado Chart custom visual.
While the Power BI Tornado Chart easy to use and will create you your butterfly in a minute. It is lacking when it comes to customizations. where the customizations are mostly around colors. In my case I needed more.
You see I wanted to create a chart where the class name that I wanted to compare against shows in the middle of the Tornado instead on the classes to be on the right or left ( the only available options in the visual). Or maybe I wanted to show an icon/Image instead of a class name, which is unfortunately unsupported in the current visual.
When completing this tutorial you will be able to create a Chart like below. So if you are interested continue one reading.
Power BI Matrix To The Rescue
Matrix visual is one of the most flexible visuals in Power BI. It has the ability to contains images , icons , text , numbers ,and even number bars. The rest of this tutorials will show you how to use this powerful visual to create a flexible and customizable Tornado chart.
The first thing you need to do is to create a dummy dataset. My dummy data set only includes 3 rows and 3 columns. And it compares number of products sold by a bank in its brick and mortar branches and its online banking portal.
Lets start by creating Adding a matrix visual
We will need to set all grid boarders to white or same as our background color. 
Now, let go back to the Values place holder, right click on the Online field, select Data Bars from conditional formatting
This will be our left wing of our butterfly. So the Bar needs to point from "right to left". Make sure that you set the desired color of this side of the butterfly. And Click OK.
Lets complete the butterfly, by setting the right wing. To do so, we need to Branch Field in the values placeholder and add a data bar. This time we will make the bars direction from the "left to right".
Adjust the size/length of the wings by pulling simply by resizing the column width. make sure
You can change the bar height by changing the font size of the values from the format pane.
Not only that you can also using images or icons in the matrix instead of text
We can align the number to the middle. This can be done from the format pane. Just select the specific column that you want to align. the select the middle alignment icon. In my case I did this for the "Online" and "Branch" Columns.
You may want to change the colors of the numbers. You can do that in the Text color option in the above step.
Or you might want to remove the numbers completely. Of this is the case you can do that by going to the data bar option for each field you created a data bar for and check "Show data bars only ".
Our final Tornado chart looks like the below.
This is not bad since we started with a matrix visual and ended up with Tornado chart. Equipped with the flexibility of Matrix visual and your creativity , your Tornado chart will definitely standout.
Regards
Comments
Post a Comment