Data Analysis with Power BI.

An Analysis of an HR Dataset with Power BI.

AMOLE OLUWAFERANMI
8 min readOct 3, 2022
Image from Borgenproject

Human resources (HR) is the division of a business that is charged with finding, screening, recruiting, and training job applicants. It also administers employee-benefit programs.

HR plays a key role in helping companies deal with a fast-changing business environment and a greater demand for quality employees in the 21st century. Source: Investopedia

Background of Analysis

This analysis was carried out on a popular dataset on the internet which is the HR Analytics dataset.
I got this dataset from a video I watched on the Data with Decision YouTube channel where the tutor was trying to work with this dataset and I found it nice and decided to do my analysis on it as well.

Data Analysis Process

Before you analyze a dataset, there are some steps you have to go through to enable you to make informed decisions and some of the processes I followed were:

  • Data Overview
  • Data Preparation
  • Data Visualization
  • Insights and Recommendations

Data Overview

This is the first step i took before going further with my analysis and this was basically having a glance at my dataset to know what this is about that is, the number of rows and columns the data consists of, how many records are missing, do the values of each column follow a particular order and so on.

This is an important step because it enables you to really have an understanding of your dataset before going into analysis with visualization to avoid mistakes.

Image by author: Dataset Overview.

Data Preparation

After having an overview of my data, looking at what and what it entails, i headed on to Power BI to go ahead with the next step of my analysis which was “Data Preparation”.

I imported my dataset into Power BI and I used the Text/CSV means of importing because the dataset was in a CSV format.

Image by author: Importing data.
Image by author: Dataset after importing.

After importing the dataset, it was in a single column which I couldn’t work with because the data didn’t just make any sense the way it was which makes the first step of analysis important. I went ahead to split this column by clicking on the split column under the Home section of the Power query to split by delimiter and after this process, my data was making more sense than it earlier was.

Image by author: Process of Splitting.
Image by author: Dataset after splitting column.

From the above picture, we can see that the data looks nice but the headers were on the first row so i want further to make the first row my headers by going to the Transform part on the Home menu in Power query and clicked on use first row as headers, see picture below.

Image by author: Making first row headers.
Image by author: Dataset looking nicer to view.

At this point, i was okay with my dataset haven gone through each column to make sure the data types were correct then i click on close and apply to import the data into Power BI. The data was successfully imported.

After importing my data successfully, I had to create some measures using DAX to aid my analysis and some of the measures created were:

Total Employees in the company,

Image by author: Total Employees

The number of male workers in the company,

Image by author: Number Male Workers

The number of female workers in the company,

Image by author: Number of Female Workers

Percentage of male workers,

Image by author: Percentage of Male Workers

Percentage of female workers: I created this measure just as I did for the percentage of male workers.

Due for Promotion & Not due for Promotion: Before I created this two measures, there was no definite way to know those who were due for promotion and those who were not because we only had a column with the year each worker was last promoted.

Image by author: Year since last promoted

After seeing that column, I decided to create a column through conditional formatting such that workers who were last promoted 10 years ago are “Due for promotion” and those below 10 are “Not due for promotion”.

Image by author: Conditional Column
Image by author: After conditional formatting
Image by author: DAX measure

Percentage due for promotion & Percentage not due: Just like I did for the the percentage of male worker. I also did for the percentage due & not due for promotion.

Lay-off & On Service: To create this, I had to also create a conditional column because there was no column that was specifically stating those who are to be laid-off and those who are still to remain in service.

Image by author: Conditional Column to determine those to be laid off and those who are to remain.
Image by author: Calculating workers to lay-off
Image by author: Calculating workers to continue service

Furthermore, I created a conditional column to determine if an employees home is far from work, close to work or very close.

Image by author: Conditional Column to determine if n employee is staying far or close to work

I also created another column to determine the how good the Job Satisfaction Rating of every employee that is if the rating was High, Medium or Low.

Image by author: Conditional Column to determine Job Satisfaction Rating

After creating all the measures and ensuring that my DAX. measures were ready, I wanted to show the rating using stars so I created a Quick measure using the Quick measure button close to the New measure button and then chose Star rating in the calculation section then put in the values as seen in the picture below:

Image by author: Creating Star Rating

Data Visualization

After having my data validated (making sure it’s clean, each column has the right datatype, and so on) and creating measures to aid my analysis, I went on to create my visuals for analysis but what I did first was to change the canvas background to an image I created earlier on Microsoft PowerPoint.

Image by author: Canvas Background

I went further to add the menu button, help button, some of the pages I want to be bookmarked (at that time, I wasn’t so sure what names I was going to give those pages).

Image by author: Background after adding buttons.

After making my background look nice, I started inserting visuals such as: Cards, Stacked bar chart, Stacked column chart and donut chart and the first page of my report came out this way with some insights.

Image by author: First Page of Report

When filtering by some parameters on my first page, some of the cards were showing blank for some measures I earlier created so I had to make a little change to the DAX. formula and examples are:

Image by author: Changed Formula
Image by author: Changed Formula

I added the IF statement with the ISBLANK function so as to eradicate the (BLANK) and replace with 0.

I went further to create some visuals on the second page and apart from the cards and stacked column chart which were on the first page, I also represented some of the dataset with Pie chart, 100% stacked column chart and a matrix which came out well with some insights as well. See picture below:

Image by author: Page 2 of my report

Now, I came to the last page for inserting visuals before the final page which contained the Insights and recommendations. In this page, I used a represent some information about the workers in this company but before I achieved that, I had to import another dataset which contained employee names and numbers then I merged the queries together and filtered the particular column to show the employee names only. See pictures below:

Image by author: Click on Merge Queries
Image by author: Page to determine the type of join.
Image by author: After merging.
Image by author: Filtering the column to Employee Name.
Image by author: The column after filtering.

All that said and done, my visual (a table) made more sense and it came out as seen in the picture below:

Image by author: Employee details represented with a table.

The last page contained the insights and recommendations for the company, picture below.

Image by author: Insight and Recommendation.

Conclusion

I had a wonderful experience working with this dataset because I had never worked with bookmarks but I learn t it using this dataset/project.

Note: All the analysis was done with Power BI.

A number of insights that were drawn from this dashboard has been said earlier but you can further draw out more analysis by accessing the dashboard hosted on the Power BI service here.

Corrections and contributions are welcomed in the comment section and we could also connect through LinkedIn. Also, you can follow my Medium page to get more insights as to things you need to know and do as a data analyst as I document my journey.

Project was inspired by Data with Decision.

Bookmark design was inspired by ExcelFort.

Keep Learning!

--

--

AMOLE OLUWAFERANMI

Data Analyst | Data Science | Data Visualization | Python | MySQL | Microsoft Power BI | Microsoft Excel | Analysis with precision