Quantcast
Channel: Cloud Training Program
Viewing all articles
Browse latest Browse all 1890

Getting Started with Microsoft Azure Power BI: Case Study

$
0
0

This blog post will walk you through a case study to build and publish a business report in Microsoft Azure Power BI Service.

We will discuss this in detail in our Microsoft Certified Power BI Data Analyst Associate FREE Class. This FREE class will also talk about Microsoft Certified Power BI Data Analyst Associate certification exam specifics.

Topics this blog post shall cover:

So let’s get started in building our Power BI report!

Overview Of Power BI

Power BI is a Business Intelligence tool used by BI designers to fetch data from various sources, transform and shape the data in a consolidated format. It then creates visualizations and business reports, dashboards, or data apps from that data. Data Analysts, Reporting Managers use Power BI to gain insights from their business data since it contains a vast amount of data transformations and flexibility in collaborating on data visualizations.

Since Power BI does everything from data ingestion to its transformation along with data visualizations, is a self-reporting Business Intelligence tool. Hence it has many customers in the market and a good reputation.

To know more about Power BI, its features, uses, advantages, and career prospects do visit our blog:
Introduction to Microsoft Power BI Platform – Everything You Must Know

Demo: Case Study Introduction

Imagine that you are a Business Intelligence Analyst working for a sunglasses retailer. Your manager has asked you to give him a Report of the States which are a good market to sell their products i.e sunglasses.

You gather two datasets that you think are very useful, but are messy and of different structures. Hence you start to use Power BI to quickly import, transform, merge and visualize your data in a report for your manager.

We follow the logic that the States whose climate is very sunny (temperature or weather very hot) are a great market to sell your products.

Now that we have our problem statement in mind, we will start using our business logic to create a Power BI report which will show the States having the sunniest climate. We will go through the following steps at a time:

  • Step 1: Create An Azure User For Power BI
  • Step 2: How To Sign-Up On Power BI
  • Step 3: Process Datasets On Power BI
  • Step 4: Merge The Datasets
  • Step 5: Create A Power BI Report
  • Step 6: Publish The Report

So let us start with Power BI designing right away!

Step 1: Create An Azure User For Power BI

For this demo, you will need a work or school email address to sign up for Power BI. Power BI does not allow you to sign up using email addresses provided by consumer email services or telecommunication providers (gmail.com, outlook.com, hotmail.com)
In this case, we will create a new user in our Microsoft Azure Portal which will end with onmicrosoft.com, making it valid as a corporate email ID.

  • Log into your Microsoft Azure Portal and create a new User in the Azure Active Directory menu on the left. The newly created user will now appear in the All users blade of the page.
  • You will be able to see that the email address assigned to this user will be suffixed with onmicrosoft.com

Step 2: How To Sign-up On Power BI?

Now we will use the email address of the Azure User-created above to Sign-up on Power BI and create an account there. First, you will need to have Power BI Desktop installed on your machine using this official link.
After that we can Sign-up on Power BI as follows:

  • On starting the Power BI application, click the Sign-In option at the top-right of the console and use the credentials of the Azure User you created above.
  • Another page opens in the browser, asking you to again enter the same credentials. If they are correct, click the Start option in the box to complete the account creation procedure.
  • You can now log in to your Power BI application with the same credentials and get started

A Glimpse Of Power BI Desktop

On successful login to Power BI Desktop, you will see the below screen. It is divided into many sections which serve a useful purpose. Let us have a quick overview of the useful ones:

Power BI Desktop

  1. This is your Username or Account with which you have logged into Power BI. Clicking this will give you actions to switch account, log out or directly go to the Power BI web service of your logged-in account.
  2. This will show you the Name of your project you are working on. It is currently Untitled as we have not started our project yet.
  3. This is the Visualization Canvas which will host all of your Power BI content such as visuals, reports and dashboards.
  4. The Menu Bar containing various actions to be taken related to your content creation. Some actions will be activated only under certain conditions – selecting a visual for example.
  5. This Report Button shows your ongoing visualizations.
  6. The Data Button shows the individual datasets that you have imported separately in a structured format.
  7. The Data Model Button displays the relational schemas that you may have formed during merging or joining different datasets in a diagrammatic format that can be easy to understand.
  8. The Visualizations Section shows all the available visuals that you can simply drag-drop on the Canvas.
  9. The Filters Section (expandable) gets available when some visuals are created. It can filter your data inside the particular visual.
  10. The Fields Section (expandable) also is used when there is some content on the Canvas. Shows all the imported datasets and their associated columns. We can drag and drop columns from here directly on the canvas.
  11. The Page Button allows us to create separate sections of pages for our reports.

Step 3: Process Datasets On Power BI

By this section, we have created an Azure User to use those corporate credentials to Sign-up on to Power BI. With that preparation done, we will now start our hands-on demo. We will import two web datasets into our Power BI workspace and pre-process them. This is to make them ready to be consumed for our upcoming visualizations.

  • In the Power BI Home menu, click on the Get Data button ->  Web option. We provide the URL of the dataset in the box that appears to import it from its URL. In a new dialogue box, in the Anonymous blade, we select the path of the full URL and click Connect
  • Go to Navigator dialogue box -> main table ->  Transform Data button. Remove Crime, Culture, Wellness and the Overall Rank columns. Change the name of the table to sunglass sales.

Analyze the columns that are left. The Affordability column tells us the level of affordability it is to live in that State. The higher the number, the lesser is the State affordable to live. The Weather column (the most important one for our case study) shows the rank of State in terms of its temperature or climate. Greater values denote that the State has a more sunny climate (exactly what we look for).
Now we sort the Weather column in ascending order.

This will result in the States having the hottest climate landing below the table. This will help us identify the Top 10 States for example, which will be beneficial for our sunglasses sales. Higher the temperature in a State, the better market it is for our business.

  • Remove the default column names by using the Use First Row as Headers option. Also, remove the unwanted first-row using the Remove Top Rows option. The first dataset will look like this:
  • Power BI Dataset-1Import another web dataset from its web URL. Go to Navigator dialogue box, select Codes and abbreviations for US states table -> OK
  • Delete all columns EXCEPT the Names and status of region, Name and status of region and ANSI (Letter format) columns.
  • Filter Column 2 where its rows contain ONLY State or Commonwealth as their values using the Filter Rows dialogue box.
  • Change the names of the Columns to State Name, Status, Abbreviations respectively and the name of the table to State Codes

Power BI Dataset-2

At this step, we have both our datasets imported and pre-processed.

Step 4: Merge The Datasets

We will now merge our two pre-processed datasets as a single dataset. It will then as a whole, will be used for creating visualizations.

  • Select the sunglass sales dataset on the left menu and merge the two datasets using the Merge Queries option. Use the State column of the sunglass sales table and the States Name column of the State Codes table as the joining or common column to merge them.
  • Both tables would be seen in separate consoles with combined columns.
  • We expand the State Codes column to show the Abbreviations. 
  • The merged datasets can be seen as separate table sources in the Data Button area:

merged data-1

Their schema can be seen clearly in the Model Button area to understand their joining relation. Hover the cursor to the join icon to see the columns on which they have been joined:

Power BI merged dataset-2

Step 5: Create A Power BI Report

At this point, both our datasets are imported, pre-processed and merged into one. We now build a simple report in Power BI using the merged dataset. It will consist of three visuals:

For the first visual we will show a map of the States, the second visual will display a bar chart of State v/s Weather and the third visual will have a table of State name, Affordability, Weather.

  • Select the sunglass sales dataset under the Fields section. Drag and drop the State column in the dashboard canvas. Filter the Map which is formed to display information of the bottom 10 rows of the dataset. This will give us the top 10 hottest climate State names, which are the best market for our sunglasses business.
  • In the Visualizations section, click the Bar/Column chart icon. A template forms on the canvas. Drag and drop the State and Weather column into the template. Make sure under the Value option below the Visualization section, we include the Weather column as its average. A bar chart will be shown showing the temperature level of States. This is for more generic analysis of States with their climate levels.

Our two visuals will look like this below. You can see on selecting the Bar Chart, on the Menu Bar many data formatting and drilling options appear. Some of them are New Measure, Transform Data.

Power BI Visual-1

The two visuals shown above are interactive in nature. If you click on the Bar Chat the Minnesota State, for example, the adjacent Map will show its location. This applies to all other types of visuals you create in Power BI.

Power BI Visual-2

  • For the third visual (you can crate this one on a new page) click the Table icon from the Visualizations section, in the template drag and drop the State, Affordability, Weather column. This gives a good overview of the States, their Weather as well the ability of the market to spend money on our product.

Step 6: Publish The Report

We publish our report to our created Power BI account.

  • Go to Publish button in the Home Menu and save your work in your local machine first (if not saved earlier)
  • Log in to your Power BI web account. All your created content, including the one created in the blog, will be published under My Workspace -> Reports

Power BI Service

Power BI helped us create our report according to our requirements in a lesser amount of time. Our manager can now see our reports and can find the States which are a good market for the business.

Get Certified For Power BI: Microsoft [PL-300]

Microsoft Certified: Power BI Data Analyst Associate [PL-300] Certification is a great start to prove your Power BI skills in the job market. This certification is very useful to Data Analysts, BI Practitioners or business report designers who use Power BI to make use of their data in creating visualizations for customers or organizations for insights.

References

Next Steps to begin with PL-300 Certification:

In our PL-300 Certification Training Program, we’ll cover 10+ Hands-On Labs. If you wish to start your journey towards becoming a Microsoft Certified: Power BI Data Analyst Associate, try our FREE CLASS.

DA100_CU

The post Getting Started with Microsoft Azure Power BI: Case Study appeared first on Cloud Training Program.


Viewing all articles
Browse latest Browse all 1890

Trending Articles