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
jimmyfromus
Helper III
Helper III

Unsure how to merge 2 tables

Hi,

I have 2 tables that I'd like to merge. See table 1 and table 2 below.

Table1:

01_Table.JPG

Table 2:

02_Table.JPG

 

I have a column called company/contact in table 1 which contains either a company or a contact which I need in my third table. I'd like to merge this column but in my second table I have company and contact seperated into 2 columns.

In the third table, I'd like to have the columns, membership number, company/contact, committee, contactID, CompanyID but I'm unsure how to merge. In the end I'd like to see which company or contacts are in a committee.
If I merge via the contactID, I have the committee for the contacts but not for the companies.

Could anyone help me with this?

Thanks.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture) , show the expected outcome, and give sufficient context.

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

No need to apologize - that's always the best outcome.

@lbendlin I realised I didn't resolve it. By the way, I keep getting an invalid html error when I try to insert a table either by copying and pasting or by adding it using the icon above.

The first table looks like this: 

contact/company           contactid            companyid
company a                                                  7
company b                                                 8
company c                                                  9
contact a                           4  
contact b                           5  
contact c                            6  

The second table like this: 

 

contact           contactid         company                companyid
contact a         4                    company a                   7
contact b         5                    company b                  8
contact c         6                    company c                   9


If I create a relationship between the 2 tables via the contactid, I can click on a contact, contact a for example, in table 1 and the contact a in table 2 will also react. I would however like that when I click on a company (company a for example) in table 1, the same line with company a and contact a will react in table 2. Let me know if I should open a new question for this as this one is already closed. Thank you. 

lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture) , show the expected outcome, and give sufficient context.

Sorry, I think I worked it out myself. 

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.