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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
assemomar
Frequent Visitor

Relationship between two tables

Hi

Please if anyone can help me to make relationship between two tables as shown in the attached pictures , it is always give me messages as (many to many) but I need to be relationship (Many to one).

 

Thanks & Regards,,Relationship-1.jpgRelationship-2.jpg

 

 

7 REPLIES 7
assemomar
Frequent Visitor

Dear Mr. Idressshatila
for your information when I add in table : months+++ (column month) only january it is working for relationship, but the problem when I add in table : months+++ January , February, March, April , then message : many to many relations appear
Could you please help me how to solve this

 

Thennarasu_R
Responsive Resident
Responsive Resident

@assemomar 

If have a Unique value in Month ++ table, It should come from one to many relationships. May be have Blank in your Month ++ table defanetaily it will come many to many relationship.Check your master table either blank or not.

Thanks,
Thennarasu R

assemomar
Frequent Visitor

Dear Mr. Idressshatila

Yes the table : functionallocationID, has too much duplicate. It is big data more than 7500 rows.

so please how to make relationship be many to one

@assemomar ,

 

in order to be one to many, the table should have a distinct value of the id that you are making the relationship with.

 

in your case you should have a middle table with distinct functionallocationID that connect with both of these tables.

 

check the concept of star schema https://learn.microsoft.com/en-us/power-bi/guidance/star-schema

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Idrissshatila
Super User
Super User

Hello @assemomar ,

 

it shows many to many since in both tables there are many values under the functional location id, if you want it to be many to one then you should have unique ids in the one table.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Dear Mr. Idressshatila

The column functionallocationID it is the unique , please if you could help me in picture how to solve it

@assemomar ,

 

in the month++ table, does the  functionallocationID has duplicates ?? because as per the relationship many to many it shows that it has duplicates that's why it's showing many to many.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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