Power Bi - How to Add a Table from the Presentation Layer into the .Pbit Model

Introduction

This guide provides step-by-step instructions on how to add new data tables from the presentation layer, to optimise your reporting capability. This can be useful because we only include tables that are required for the reports to aid performance - the more tables included the slower the performance!

As we add more data, if the new field is included on an existing table in the model then they will automatically be added into the model.  If they are associated to a new table then you will need to add the new table to the model. In this guide you will learn how to do just that.

 

User Roles

  • Approved Data Warehouse Users

How to: Add a Table from the Presentation Layer into the .pbit Model

 

Below are the steps on how to do this from within PowerBI:  

Step One :  Select Transformation data 

blobid0.png

 

Step Two : Select any table 

blobid1.png

 

Step Three : Select  “Advance Editor” from the ribbon 

blobid2.png

 

Step Four : Copy the M code in the advanced editor  

blobid3.png

 

Step Five : Select “New Source” and “Blank Query” 

blobid5.png

 

Step Six : Select “Advanced Editor” on the blank query 

blobid7.png

 

Step Seven : Paste the copied M code, modifying to reference the new table. Click Done.

 

Step Eight : Close and Apply. Data from this table will load into your Power BI model.

blobid8.png

 

Step Nine : Manage Relationships, please note it is not recommended to use the auto detect relationships


Select the model:

blobid9.png

Connect the new table to existing tables: drag and drop the connection point 

blobid10.png

 

Step Ten: Set the cardinality 

 Right click and select properties 

blobid11.png

  blobid12.png

N.B: Make sure that the relationships is marked as active.