Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
gipiluso
Resolver II
Resolver II

Dealing with more than one Fact Table using “Linked Table”

Create a model with more than one Fact Table is a common scenario, and usually we have to join these Fact Tables against a common set of dimensions.

Common problems of this scenario are circular references (Indirect relations that prevent to activate a direct relation) and models difficult to read and maintain.

I would like to share a practice known as “Linked Table” acquired in my past experiences on different BI tools (QlikView, Cognos).

A “Linked Table” can be expressed in PowerBI as a table that contains the common fields from two or more tables.

In a recent project, I need to create a model in PowerBI to analyze Purchase and Payments Statistics of a Retail Store Chain.

The below table contains a simplified scenario in order to focus on the “Linked Table”:Scenario.PNG

*Be aware that Payment Statistics are not available on Product Category.

Just for highlight circular references in this simply scenario I enabled Cross Filtering Dimension Option on Both.

As you can see, model prevent to create a relation between Vendor and Purchase Order since this is already filtered by indirect relations:LinkedTableWrongModel.png

Fig 1: Data Model with Circular References

If you try to enable the inactive relation you get the classical error in fig2:Error with Circular Relations.png

 Fig 2: Error trying to enable the inactive relation

 

In order to allow the direct slicer from Vendor Dimension to the Purchase Order we can enhance the model adding the linked table following these steps:

  1. Create a Linked Table containing an Identity (LinkedTableKey) for each couple {Company Code; Vendor Code} as set from the Fact Table (Purchase Order and Payment Statistics);
  2. Replace the fields {Company Code; Vendor Code} in the Fact Table (Purchase Order and Payment Statistics) with the related field LinkedTableKey created in the step 1;
  3. Link Vendor and Company directly to the LinkedTable.

 

LinkedTableRightModel.png

Fig 3: LinkedTable Model

 

As you can see in Fig3, LinkedTable approach allows your Model to slice both Fact Tables, in addition, the model is more readable and maintainable.

Of course, this is just one of many approach to solve the Scenario.

 

How did you deal similar Scenario? Do you plan to use Linked Table in your projects?

3 REPLIES 3
Anonymous
Not applicable

hi gipiluso,

 

Thanks for the solution. But I have a problem. I have 3 facts and 4 dim tables:

 

F1 - links to D1,D2,D3

F2 - links to D2,D3,D4

F3 - links to D3,D4

 

In this scenario, how do I set up the linked table ? Do I just create 1 broad linked table which (with columns linking to all Dimension tables) and has got distinct entries from each fact table, and NULLs where the dimensions are absent ?

 

 

thanks,

 

If you can create just one linked table i suggest to go for it

v-shex-msft
Community Support
Community Support

Hi @gipiluso,

 

Thank for sharing, I think these will be help for others who has the similar scenario.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.