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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Sitak_Johar
Frequent Visitor

How to join two tables without unique values?

Hello All,

 

I am having trouble to create a relationship between 2 tables to create the expected output visual.

 

I have two tables: Table 1 and Table 2
Sample of Table 1 is:

Server NameContactContact.1Contact.2Contact.3Contact.4Contact.5
ABC(delimiter)A(delimeter)B(delimiter)CABC  
DEF

(delimiter)A(delimeter)D(delimiter)E(delimiter)F

ADEF 
GHI(delimiter)A(delimeter)E(delimiter)G(delimiter)H(delimiter)IAEGHI

 

Some background on Table 1:

  • The original table only has the 1st 2 columns - server name and contact
  • Contact column has all the contact ID's for a particular server but they are all contained in one text
  •  Hence I've split up the Contact column using Power Pivot with a common delimiter and the results are the columns starting from Contact.1
  • The number of contacts are not pre-defined, it could be anywhere between 1 or 50 or even more

 

Sample of Table 2:

Resource IDResource Name
ABrian
BDavid
CJulien
DMichael
EJack
FSam

 

Some background on Table 2:

  • For each Resource ID, we have the resource Name

 

Relation between Table 1 and Table 2:

  • The contact field's starting with contact.1 etc. are the resource ID in the 2nd table
  • Here I am having difficulty to create the appropriate relationship in Power BI since the values in Table 1 are lined up in a row instead of a column

 

Expected Output:

Server NameResource IDResource Name
ABCABrian
BDavid
CJulien
DEFABrian
DMichael
EJack
FSam

 

OR it could be the following output:

Resource IDResource NameServer Name
ABrianABC, DEF
BDavidABC
CJulienABC
DMichaelDEF
EJackDEF
FSamDEF



Any one of the output could work.

 

Thanks,

VH

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Sitak_Johar You can split your values into rows and then from there it will be easier to set the relationship and contacts will be on seperate rows instead of multiple columns.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

1 REPLY 1
parry2k
Super User
Super User

@Sitak_Johar You can split your values into rows and then from there it will be easier to set the relationship and contacts will be on seperate rows instead of multiple columns.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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