cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

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

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 it as the solution to help the other members find it more quickly.
Highlighted
New Member

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

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,

 

Highlighted
Resolver II
Resolver II

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

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

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors