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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Xavier
Regular Visitor

2 fact tables with 2 dimensions tables ... I'm turning around

Hello,

I have two dimension tables : Calendrar, Customers

I have two fact tables using this two dimensions : Fact table 1 & Fact table 2

If I created relationsships between this table, I have an inactive link (circle) : 

Calendar & Customers  --> Fact table 1 : OK 

Calendar & Custimers --> Fact table 2 : 1 link active, the other is not

Do you have a tips for me ? Should I duplicate a dimension table for example ?

Thank you very much.

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

The relationship direction between 'Fact table 1' and 'Calendar' is wrong.  It should be 1:* (one to many) from 'Calendar' to 'Fact table 1'.  You should also only join to your calendar table using the date field.  Joining to fields that have things like Q1-22 or FY-2019 causes problems that you are running into.

You might have to add a real date filed to each of your Fact table.  If the period field is month-year for example, you make a field that is the first dat of the month for that year in the fact table, then join that to your calendar table.

View solution in original post

5 REPLIES 5
jdbuchanan71
Super User
Super User

The relationship direction between 'Fact table 1' and 'Calendar' is wrong.  It should be 1:* (one to many) from 'Calendar' to 'Fact table 1'.  You should also only join to your calendar table using the date field.  Joining to fields that have things like Q1-22 or FY-2019 causes problems that you are running into.

You might have to add a real date filed to each of your Fact table.  If the period field is month-year for example, you make a field that is the first dat of the month for that year in the fact table, then join that to your calendar table.

jdbuchanan71
Super User
Super User

Can you show me a picture of your model?

Xavier
Regular Visitor

I tried to ... but Power BI not allowed it : "Ambiguity between Customers & Fact table 2" 

jdbuchanan71
Super User
Super User

@Xavier 

Your model view should look like this.

jdbuchanan71_0-1655212610593.png

If one of the relationships is inactive you can double-click it to open the dialog to turn it on.

jdbuchanan71_1-1655212683535.png

 

 

Here is the model with the inactive relationship

Xavier_0-1655222109214.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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