Reader small image

You're reading from  Expert Data Modeling with Power BI - Second Edition

Product typeBook
Published inApr 2023
PublisherPackt
ISBN-139781803246246
Edition2nd Edition
Right arrow
Author (1)
Soheil Bakhshi
Soheil Bakhshi
author image
Soheil Bakhshi

Soheil Bakhshi is the founder of Data Vizioner and is a sought after BI consultant. Working in data and analytics for more than 20 years, Soheil's experience lies in Microsoft BI, Data Warehousing, and Power BI platform. He possesses MSCE, MCSA certifications and is a Microsoft MVP (Most Valuable Professional). He has a passion for sharing knowledge via his website and speaking at conferences and Power BI community events locally and globally. In following his desire for simplicity and efficiency, he is behind Power BI community tools and commercial products such as Power BI Exporter and Power BI Documenter.
Read more about Soheil Bakhshi

Right arrow

Creating fact tables

Now that we have created all the dimensions, it is time to create a fact table that contains numeric values and the primary keys of the dimensions as foreign keys. The Sales Base and Customer Base data show that the Sales Base table holds many numeric values. Therefore, a fact table can be derived from the Sales Base table, which we name Sales, by following these steps:

  1. Reference the Sales Base table and then rename the new table Sales.

We want to get ProductKey from the Product table. To do so, we can merge the Sales table with the Product table.

  1. Click Merge Queries.
  2. Select the ProductCategory, ProductSubcategory, and Product columns, respectively.
  3. Select the Product table from the drop-down list.
  4. Again, select the ProductCategory, ProductSubcategory, and Product columns.
  5. Select Left outer (all from first, matching from second) from the Join Kind drop-down list.
  6. Click OK:

Figure 6.37:...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Expert Data Modeling with Power BI - Second Edition
Published in: Apr 2023Publisher: PacktISBN-13: 9781803246246

Author (1)

author image
Soheil Bakhshi

Soheil Bakhshi is the founder of Data Vizioner and is a sought after BI consultant. Working in data and analytics for more than 20 years, Soheil's experience lies in Microsoft BI, Data Warehousing, and Power BI platform. He possesses MSCE, MCSA certifications and is a Microsoft MVP (Most Valuable Professional). He has a passion for sharing knowledge via his website and speaking at conferences and Power BI community events locally and globally. In following his desire for simplicity and efficiency, he is behind Power BI community tools and commercial products such as Power BI Exporter and Power BI Documenter.
Read more about Soheil Bakhshi