To bolster our skills in Power BI, day 3’s challenge is to prepare and manipulate the Titanic data set using Power BI. This is then followed by visualising this maritime disaster via Power BI. An extra challenge was to find a way to determine what would happen if there were more lifeboats onboard the Titanic. A variant of the data set supplied to us is available on Kaggle. In this blog post, I will discuss some of the differences from a user perspective when using Power BI (compared to Tableau or Alteryx).

 

Data Preparation in Power BI

Joining data tables in Power BI required Editing Queries under the Home ribbon. The Power Query Editor will then run. Next, you will need to Merge Queries. After joining all the required data sets, if you need to pivot/unpivot fields in a table, this can be done through the Transform ribbon within the Power Query Editor. Alternatively, select all columns required and right click on column headers. The options for “unpivot columns” or “unpivot only selected columns” will appear. In the following example, I have unpivot the columns so that I can more easily extract the passenger class fields:

 

 

Note from the above example that I have also used the Split Columns function with a space delimiter (right click column headers to find this). This is to split the “Travel Class” out of the previous field names.

 

Learning and using Power BI was a somewhat frustrating process. However, I also found a few aspects where it is similar or better than Tableau. For instance, the Map Visualisation tool recognises country names automatically as a location. In addition, there is a “Replace Value” option to quickly replace values in the columns. In this case, I have used it to change null or missing values in certain columns to zero.

 

 

Visualising Survival Rates for the Titanic Disaster

There are various tricks that we learnt today while using Power BI and likely many more left to be discovered. This will likely be covered in future blog posts. Given the time constraints, I managed to produce a visualisation that allows quick comparison of survival rates by country as well as the average fare these passengers paid. I also created a second dashboard (shown below) that shows the distribution of passengers by travel class that got onto lifeboats. This second dashboard also allows a user to calculate how many more lives that could be saved with extra lifeboats. I assumed that the average lifeboat occupancy rate stayed the same in this case.

 

 

That’s all for today. Looking forward to another exciting day in Dashboard Week.