Reader small image

You're reading from  Power BI Machine Learning and OpenAI

Product typeBook
Published inMay 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781837636150
Edition1st Edition
Languages
Concepts
Right arrow
Author (1)
Greg Beaumont
Greg Beaumont
author image
Greg Beaumont

Greg Beaumont is a data architect at Microsoft, where he enjoys identifying and solving complex problems backed by his experience in data architecture and a passion for innovation. Focusing on the healthcare industry, Greg works closely with customers to plan enterprise analytics strategies, evaluate new tools and products, conduct training sessions and hackathons, and architect solutions that improve the quality of care and reduce costs. He strives to be a trusted advisor to his customers and is always seeking new ways to drive progress and help organizations thrive. He is a veteran of the Microsoft data speaker network and has worked with hundreds of customers on their data management and analytics strategies.
Read more about Greg Beaumont

Right arrow

Exploring Data Using Power BI and Creating a Semantic Model

Chapter 2 was a tedious process of combing through the FAA Wildlife Strike raw data, identifying the columns of data that you want to carry forward for analysis, and then setting up queries that will transform the data and metadata for the purpose of analysis and ML with Power BI. However, it was important work.

Now, you are ready to create a semantic model layer using a Power BI dataset and then set the foundation for the data that you will use to train ML models in Power BI. If you aren’t familiar with a semantic layer, it is a description commonly used in business intelligence solutions to describe a layer that translates data descriptions into common business terms and logic. For example, a source column named columnname or column_name might be displayed to users as Column Name via the semantic layer. Also, the logic for runtime calculations such as Year to Date Cumulative Sales often exists in the semantic layer...

Technical requirements

For this chapter, you will need the following:

Designing relationships between tables

In a Power BI dataset, relationships between tables determine how queries that involve data from both tables are generated. If you’ve taken an introductory class on Power BI, such as Dashboard in a Day, learning about relationships is a foundational skill for Power BI development. Back in Chapter 2, you determined that the tables have the following key values to establish relationships:

  • Date Table: The Date column matches up to the Incident Date column on the Strike Reports table
  • Aircraft Type Info: Aircraft Code matches up with Aircraft Class Code on the Strike Reports table
  • Engine Codes Info: Manufacturer Code and Model Code are compound keys matching up with AMA and AMO from the Strike Reports table
  • Engine Position Info: Engine Code maps to four columns on the Strike Reports table – Engine 1 Position Code, Engine 2 Position Code, Engine 3 Position Code, and Engine 4 Position Code

Let’s go ahead...

Building a Power BI dataset

You review the preliminary data model design from your earlier efforts, and note that you have approached a fork for which the relational analytic data that will populate the Power BI dataset will likely have differences from the flattened data used for ML in Power BI:

Figure 3.13 – You will now populate Power Query queries for the Power BI dataset

Figure 3.13 – You will now populate Power Query queries for the Power BI dataset

In order to keep your work both organized and optimized for future changes, you decide to create a new group in Power Query that will contain the tables for the Power BI dataset. You take note that when working with extremely large data volumes or a complex data model, avoiding complexity within Power Query is often a best practice. However, with your data volumes, complexity, and overall use case, it makes sense to have separate groups for different segments of the project:

  1. Create a new group within Queries called Curated Dataset Tables.
  2. Right-click each of the...

Adding measures to your Power BI dataset

As a final activity for this chapter, you will add a few basic measures to the Power BI dataset. Measures are not stored on the tables of data but rather during runtime on reports. These measures will be used to do mathematics such as total number of reports, average damage cost amounts, average height of contact calculations, and more. For now, you choose a few basic measures that will give you a starting point for analysis. In future chapters, you can add more measures as you discover new perspectives within the data.

Measures can be added using the DAX expression language, which is a key skill for Power BI. Most of the formulas will be fairly simple for anyone who is familiar with writing formulas in Excel.

Add the following measures in the Data view of Power BI while the Strike Reports Fact table is highlighted:

Summary

In this chapter, you designed key values for tables in a Power BI dataset, created a Power BI dataset, and added measures to the Power BI dataset. You have progressed from exploring and understanding raw data to working with a multidimensional dataset in Power BI that contains runtime measures. You now have the basic foundation for analytics and building an analytics report.

In the next chapter, you will build an analytical report that dives into the data and uncovers features that you will earmark for machine learning in Power BI. As you enrich the analytical report and discover new features, you will also begin to build out the datasets in Power Query that will be used to train and test using Power BI ML.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Power BI Machine Learning and OpenAI
Published in: May 2023Publisher: PacktISBN-13: 9781837636150
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Greg Beaumont

Greg Beaumont is a data architect at Microsoft, where he enjoys identifying and solving complex problems backed by his experience in data architecture and a passion for innovation. Focusing on the healthcare industry, Greg works closely with customers to plan enterprise analytics strategies, evaluate new tools and products, conduct training sessions and hackathons, and architect solutions that improve the quality of care and reduce costs. He strives to be a trusted advisor to his customers and is always seeking new ways to drive progress and help organizations thrive. He is a veteran of the Microsoft data speaker network and has worked with hundreds of customers on their data management and analytics strategies.
Read more about Greg Beaumont

Name

DAX formula

Description...