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
acao-96
Frequent Visitor

Unable to create a 1:M relationship between Dim and Facts table

Hello everyone,

I am trying to create a 1:Many relationship between two tables, but for some reason when I try to create a relationship it defaults to Many to Many and if I try to change it I get the 'cardinality not valid' error (the relationship was built based on the PIT Lifecycle Universe in the Facts table and the Orig Lifecycle Universe in the Dim table). I did notice that when I added the blank value in the Dim table, the relationship was no longer 1:M and it seemed like the relationship didn't work either when I tried to filter for the blank values in the Lifecycle Universe column in the Facts table using the PIT Lifecycle Universe column in Dim table.


Could you please let me know what I did wrong here or if I am missing something? TIA!

 

Below are my tables:

Dim TB

Dim TableDim Table

 

Facts TB

Lifecycle Universe_Fact TB.PNG

 

1 ACCEPTED SOLUTION

Hi there,

 

Thank you so much for your response. Since there are several fields similar to the Lifecycle Universe, I wasn't planning on adding additional columns to the Fact table because that would end up with too many fields.  Also, I think the problem here is that I don't know how to handle the blank value in the Dim table. If I were to merge the Dim table with the Fact table like you said (I am assuming based on the Orig Lifecycle Universe field), would the blank values in the 2 tables be able to be merged?

 

Thanks!

View solution in original post

2 REPLIES 2
ronaldbalza2023
Continued Contributor
Continued Contributor

Hi @acao-96 , create a Unique ID on your DimTable and merge it in your fact table 😉

ronaldbalza2023_0-1659652473958.png

(3) Power BI Tutorial | From Flat File To Data Model - YouTube

 

 

Hi there,

 

Thank you so much for your response. Since there are several fields similar to the Lifecycle Universe, I wasn't planning on adding additional columns to the Fact table because that would end up with too many fields.  Also, I think the problem here is that I don't know how to handle the blank value in the Dim table. If I were to merge the Dim table with the Fact table like you said (I am assuming based on the Orig Lifecycle Universe field), would the blank values in the 2 tables be able to be merged?

 

Thanks!

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.