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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
shreep1
Helper II
Helper II

PowerBI data modeling issues- 1-Many Relationships

Hello PowerBI community,

 

@Amit@Greg , @tamerj1 , @lbendlin 

 

 

 

@amitchandak , @olgad , @Sahir_Maharaj , @FreemanZ , @tamerj1 , @Greg_Deckler 

 

@christinepayton @audreygerred 

 

 

I have Workcenter Code column in Table 1 and another Workcenter Code column in Table 2. Both Workcenter Code are in Text format under data type. I am trying to link Table 1 and Table 2 but PowerBI does not allow 1-1, 1-Many or Many-1 relationship. 

 

It has easily worked in other data tables before in the past but not this time. 

 

To resolve this issue, I made sure both have same data type, eliminated null values and did Transform-Trim & Transform-Clean.

 

Still, it did not allowed me to form the relationship between those 2 data tables so that I can start applying DAX coding etc..

 

Any help or insight here to resolve this issue will be appreciated.

 

Thanks. 

3 REPLIES 3
v-nuoc-msft
Community Support
Community Support

Hi @shreep1 

 

@Greg_Deckler  Thanks for your sharing !

 

Your problem seems to be that you are unable to create a one-to-many relationship between two tables despite matching data types and performing data cleansing operations.


You can try the following operation:

 

Check if the values in the tables are unique values.

 

For one to Many relationships, Power BI requires that the "one" end of the relationship contain unique values.

 

desktop-create-and-manage-relationships

 

 If you’re working with composite models, there are limitations on creating relationships between tables from different datasets or sources.

 

Solved: Cannot create relationship between one calculated ... - Microsoft Fabric Community

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

@shreep1 So it just flat-out doesn't create a relationship at all or it creates an inactive relationship? In the case of the latter, you have multiple paths between the two tables and you can use USERELATIONSHIP in measures to choose the relationship you want. In the case of the former, what is the error you are getting?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hello @Greg_Deckler,

 

It says this cardinality is not valid for this relationship(1-1,1-Many & Many-1) which I know is valid. 

 

Is it recommended to use Many-Many relationship?--This is the only cardinality it allows to create. 

 

I have Planned Time column in Table 1 and Downtime column in Table 2.  I am trying to create a Measure inside a Measures Table where it calculates the difference between Planned Time and Downtime from 2 different tables and I am not able to do this because I cannot form a data modeling relationship between Table 1 and Table 2. 

 

I tried using Related Function, SelectedValue and many other DAX codes, none of them is working. 

 

Can you suggest how to resolve this issue?

 

Thanks,

 

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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