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

Lookup one field, return multiple matches

Hi All,

 

 

I have two tables, one (Table A) with unique ID and another one (Table B) with non unique values that refere to Table A.

 

Table A
ID
001
002
003
004
005
006
007

 

Table B 
ID(Table A)
001Pro
001Live
002Pro
003Pro
004Live
005Live
006Live
006Pro
007Pro

 

Here is what I am trying to achieve: I want to know which ID's  from Table A are missing either "Pro" or "Live" in Table B. If They are complete then "Complete"

 

 

Table A 
ID Missing
001Complete
002Live
003Live
004Pro
005Pro
006Complete
007Live

 

Your help is much appreciated!

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator v-yuezhe-msft
Moderator

Re: Lookup one field, return multiple matches

Hi @rcalvo,

In Query Editor, firstly click on your Table A, then select “Merge Queries as New” to merge the two tables.
1.PNG2.PNG

Secondly, add custom column named “Status” in your merged table.

= Text.Combine([NewColumn][Status],", ")
3.PNG

Thirdly, add a custom column named “Missing” in your merged table and you will get expected result.

= if [Status]="Pro, Live" or [Status] ="Live, Pro" then "Complete"
else if [Status] ="Pro" then "Live" else "Pro"
4.PNG

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
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

1 REPLY 1
Highlighted
Moderator v-yuezhe-msft
Moderator

Re: Lookup one field, return multiple matches

Hi @rcalvo,

In Query Editor, firstly click on your Table A, then select “Merge Queries as New” to merge the two tables.
1.PNG2.PNG

Secondly, add custom column named “Status” in your merged table.

= Text.Combine([NewColumn][Status],", ")
3.PNG

Thirdly, add a custom column named “Missing” in your merged table and you will get expected result.

= if [Status]="Pro, Live" or [Status] ="Live, Pro" then "Complete"
else if [Status] ="Pro" then "Live" else "Pro"
4.PNG

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
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.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 46 members 773 guests
Please welcome our newest community members: