cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MikeC1 Frequent Visitor
Frequent Visitor

Connecting two datasets

Hi,

 

I'm trying to join two datasets, one of which has a unique identifier and second of which has a column that contains that unique identifier (in a string along with other information). 

 

This is what it looks like: 

 

Dataset 1

 

Unique ID     Name     Info

Z01               ---          ---

Z03               ---          ---

Z04               ---          ---

Z05               ---          ---

 

Dataset 2

 

Unique ID        Name     Info

Z01+Z02          ---          ---

Z01+Z04          ---          ---

Z04+Z05          ---          ---

Z01+Z04+Z05 ---          ---

 

Is there any way of joining the two together? I considered splitting the column in dataset 2 but I'm not sure if that'll work - especially if I have a large number of unique IDs. 

 

Thanks for your help

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Connecting two datasets

@MikeC1,

 

You may take a look at the post below.

http://community.powerbi.com/t5/Desktop/joinAlgorithm-and-keyEqualityComparers/td-p/110108

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Community Support Team
Community Support Team

Re: Connecting two datasets

@MikeC1,

 

Change it as follows.

each Text.Contains([Unique ID], Earlier[Unique ID],
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Connecting two datasets

@MikeC1,

 

You may take a look at the post below.

http://community.powerbi.com/t5/Desktop/joinAlgorithm-and-keyEqualityComparers/td-p/110108

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

MikeC1 Frequent Visitor
Frequent Visitor

Re: Connecting two datasets

Thank you, 

 

I'm not very good with the m language - are you able to help me out further? How can I integrate this into my report? Through 'Advanced Editor' within the 'Query Editor'? 

 

Also assuming that my table 1 was "Dog", table 2 was "Cat", unique identifier in both of the tables was "Unique ID", is this what it'd look like? 

 

let
    Table1 = Table.Buffer(Dog),
    Table2 = Table.Buffer(Cat),
    RelativeMerge = Table.AddColumn(Table1, "RelativeJoin", 
            (Earlier) => Table.SelectRows(Table2, 
                         each Text.Contains(Cat[Unique ID], Comparer.OrdinalIgnoreCase))),
    #"Expanded RelativeJoin" = Table.ExpandTableColumn(RelativeMerge, "RelativeJoin")
in
    #"Expanded RelativeJoin"

 

Again, thanks for your help. 

Community Support Team
Community Support Team

Re: Connecting two datasets

@MikeC1,

 

Change it as follows.

each Text.Contains([Unique ID], Earlier[Unique ID],
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 421 members 4,151 guests
Please welcome our newest community members: