Book Image

Expert Data Modeling with Power BI

By : Soheil Bakhshi
Book Image

Expert Data Modeling with Power BI

By: Soheil Bakhshi

Overview of this book

This book is a comprehensive guide to understanding the ins and outs of data modeling and how to create data models using Power BI confidently. You'll learn how to connect data from multiple sources, understand data, define and manage relationships between data, and shape data models to gain deep and detailed insights about your organization. In this book, you'll explore how to use data modeling and navigation techniques to define relationships and create a data model before defining new metrics and performing custom calculations using modeling features. As you advance through the chapters, the book will demonstrate how to create full-fledged data models, enabling you to create efficient data models and simpler DAX code with new data modeling features. With the help of examples, you'll discover how you can solve business challenges by building optimal data models and changing your existing data models to meet evolving business requirements. Finally, you'll learn how to use some new and advanced modeling features to enhance your data models to carry out a wide variety of complex tasks. By the end of this Power BI book, you'll have gained the skills you need to structure data coming from multiple sources in different ways to create optimized data models that support reporting and data analytics.
Table of Contents (18 chapters)
1
Section 1: Data Modeling in Power BI
4
Section 2: Data Preparation in Query Editor
10
Section 3: Data Modeling
13
Section 4: Advanced Data Modeling

What this book covers

Chapter 1, Introduction to Data Modeling in Power BI, briefly describes different functionalities of Power BI and why data modeling is important. This chapter also reveals some important notes to be considered around Power BI licensing, which potentially could affect your data model. This chapter introduces an iterative data modeling approach, which guarantees an agile Power BI implementation.

Chapter 2, Data Analysis eXpressions and Data Modeling, does not discuss a lot of DAX as in parts 3 and 4 of this book DAX is heavily used to solve different data modeling challenges. Therefore, we'll only focus on the DAX functionalities that are harder to understand and are very relevant to data modeling. This chapter starts with a quick introduction to DAX, then we jump straight to virtual tables and time intelligence functionalities and their applications in real-world scenarios.

Chapter 3, Data Preparation in Power Query Editor, quickly explains the components of Power Query and their application. It expresses the emphasis of creating query parameters and user-defined functions along with real-world use cases and scenarios to demonstrate how powerful they are in building much more flexible and maintainable models. 

Chapter 4, Getting Data from Various Sources, explains getting data from different data sources that are more commonly used in Power BI. Then, the importance of data source certification is explained, which helps you set your expectations on the type of data you're going to deal with. This is especially helpful in estimating data modeling efforts. Different connection modes are also explained in this chapter.

Chapter 5, Common Data Preparation Steps, explains common data preparation steps along with real-world hands-on scenarios. A combination of what you have learned so far in this book with the steps to be discussed in this chapter gives you a strong foundation to go on to the next chapters and build your data models more efficiently. By learning these functionalities, you can deal with a lot of different scenarios in implementing different data models.

Chapter 6, Star Schema Preparation in Power Query Editor, explains how to prepare your queries based on the star schema data modeling approach with real-life scenarios. The Power Query M language will be heavily used in this chapter, so you will learn how to deal with real-world challenges along the way. As you have already learned common data preparation steps in the previous chapter, the majority of Power Query scenarios explained in this chapter will be easier to implement. You'll also learn how to build dimension tables and fact tables, and how to denormalize your queries when needed. 

Chapter 7, Data Preparation Common Best Practices, explains common best practices in data preparation. Following these practices will help you build more efficient data models that are easier to maintain and more flexible to make changes to. Following these practices, you can also avoid common mistakes, which can make your life much easier.

Chapter 8, Data Modeling Components, explains data modeling components from a Power BI perspective along with real file examples. In this chapter, we heavily use DAX when applicable so having a basic understanding of DAX is essential. We also have a complete star schema model in Power BI. The concept of config tables is covered, which unlocks a lot of possibilities in handling more complex business logic in the data model. The chapter ends with data modeling naming conventions.

Chapter 9, Star Shema and Data Modeling Common Best Practices, explains common data modeling best practices to help you make better decisions while building your data model to prevent facing some known issues down the road. For instance, dealing with data type issues in key columns that are used in relationships is somewhat time-consuming to identify, but it's very easy to prevent. So, knowing data modeling best practices helps you save a lot of maintenance time and consequently saves you money.

Chapter 10, Advanced Data Modeling Techniques, explains special modeling techniques that solve special business requirements. A good data modeler is one who is always open to new challenges. You may face some of the advanced business requirements discussed in this chapter or you may face something different but similar. The message we want to send in this chapter is to think freely when dealing with new business challenges and try to be innovative to get the best results.

Chapter 11, Row-Level Security, explains how to implement row-level security (RLS) in a Power BI data model. Dealing with RLS can be complex and knowing how to deal with different situations needs deep knowledge on data modeling and filter propagation concepts. Our aim in this chapter is to transfer that knowledge to you so you can design and implement high-performing and low-maintenance data models.

Chapter 12, Extra Options and Features Available for Data Modeling, introduces data modeling options such as Slowly Changing Dimensions (SCD), Object-Level Security (OLS), dataflows, and composite models, giving you broad exposure to all those topics.