- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Lookup one field, return multiple matches
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-11-2017 11:31 AM
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) | |
001 | Pro |
001 | Live |
002 | Pro |
003 | Pro |
004 | Live |
005 | Live |
006 | Live |
006 | Pro |
007 | Pro |
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 |
001 | Complete |
002 | Live |
003 | Live |
004 | Pro |
005 | Pro |
006 | Complete |
007 | Live |
Your help is much appreciated!
Thanks
Solved! Go to Solution.
Accepted Solutions
Re: Lookup one field, return multiple matches
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-12-2017 10:25 PM - edited 05-12-2017 10:36 PM
Hi @rcalvo,
In Query Editor, firstly click on your Table A, then select “Merge Queries as New” to merge the two tables.
Secondly, add custom column named “Status” in your merged table.
= Text.Combine([NewColumn][Status],", ")
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"
Thanks,
Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
All Replies
Re: Lookup one field, return multiple matches
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-12-2017 10:25 PM - edited 05-12-2017 10:36 PM
Hi @rcalvo,
In Query Editor, firstly click on your Table A, then select “Merge Queries as New” to merge the two tables.
Secondly, add custom column named “Status” in your merged table.
= Text.Combine([NewColumn][Status],", ")
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"
Thanks,
Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.