Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I have two tables containing application data, Table1 and Table2. They are related to each other using the common column, APP_NUM. Table1 has only one row per APP_NUM while Table2 can have 1 or more rows per APP_NUM. Each table contains a phone number. In Table1 the phone number belongs to the originator of the application. In Table2 the phone numbers belong to each applicant. What I would like to do is compare the two tables using the APP_NUM and indicate on Table2 if the phone number of any of the applicants is the same phone number as that of the originator on Table1.
Here is the table structure of each table
| Table1 | |
| APP_NUM | PHONE_NUM |
| 12345 | 8885551111 |
| 77777 | 3333333333 |
| Table2 | ||
| APP_NUM | ROLE | PHONE |
| 12345 | APPLICANT 1 | 1111111111 |
| 12345 | APPLICANT 2 | 2222222222 |
| 77777 | APPLICANT 1 | 8888888888 |
| 77777 | APPLICANT 2 | 3333333333 |
I would like to add a column to Table2 that indicates if there is a match between PHONE and PHONE_NUM using APP_NUM to join the two tables. So it would look like this
| Table2 | |||
| APP_NUM | ROLE | PHONE | MATCH |
| 12345 | APPLICANT 1 | 1111111111 | No |
| 12345 | APPLICANT 2 | 2222222222 | No |
| 77777 | APPLICANT 1 | 8888888888 | No |
| 77777 | APPLICANT 2 | 3333333333 | Yes |
Any suggestion on how to accomplish this, either in Power Query or a DAX measure?
Thanks in advance!
Solved! Go to Solution.
Hi @SteveG_91 ,
Try this:
MATCH = CONTAINSSTRING('Table (2)'[PHONE],RELATED('Table'[PHONE_NUM]))
Output:
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SteveG_91
You can try this:
Best Regards!
Yolo
I have two tables containing application data, Table1 and Table2. They are related to each other using the common column, APP_NUM. Table1 has only one row per APP_NUM while Table2 can have 1 or more rows per APP_NUM. Each table contains a phone number. In Table1 the phone number belongs to the originator of the application. In Table2 the phone numbers belong to each applicant. What I would like to do is compare the two tables using the APP_NUM and indicate on Table2 if the phone number of any of the applicants is the same phone number as that of the originator on Table1.
Here is the table structure of each table
| Table1 | |
| APP_NUM | PHONE_NUM |
| 12345 | 8885551111 |
| 77777 | 3333333333 |
| Table2 | ||
| APP_NUM | ROLE | PHONE |
| 12345 | APPLICANT 1 | 1111111111 |
| 12345 | APPLICANT 2 | 2222222222 |
| 77777 | APPLICANT 1 | 8888888888 |
| 77777 | APPLICANT 2 | 3333333333 |
I would like to add a column to Table2 that indicates if there is a match between PHONE and PHONE_NUM using APP_NUM to join the two tables. So it would look like this
| Table2 | |||
| APP_NUM | ROLE | PHONE | MATCH |
| 12345 | APPLICANT 1 | 1111111111 | No |
| 12345 | APPLICANT 2 | 2222222222 | No |
| 77777 | APPLICANT 1 | 8888888888 | No |
| 77777 | APPLICANT 2 | 3333333333 | Yes |
Any suggestion on how to accomplish this, either in Power Query or a DAX measure?
Thanks in advance!
Hi @SteveG_91 , create this relationship:
And create this calculate column:
Match = if(RELATED(Table1[APP_NUM])=BLANK(),"No","Yes")The result:
Best Regards
So I already have a one to many relationship between these two tables on the APP_NUM and the PHONE and PHONE_NUM would be a many to many since the phone number can appear multiple times on each table. When I look to see if the phone number is on both tables it has to be specific to the same APP_NUM. In other words, for APP_NUM 12345 on Table1 I only want to compare the phone numbers to APP_NUM 12345 on Table2. Then compare the phone numbers for APP_NUM 77777, etc.
Hi @SteveG_91 ,
Try this:
MATCH = CONTAINSSTRING('Table (2)'[PHONE],RELATED('Table'[PHONE_NUM]))
Output:
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
One follow-up question. In some instances the phone number is missing (null) from Table1 but is on Table2. The measure is returning True for those. How can I make it return False?
Hi @SteveG_91
You can try this:
Best Regards!
Yolo
Thanks again, this worked perfectly!
This does just what I needed. Thank you!!!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |