Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi there,
I have two tables, each table contains employees and contains an ID, a personal Email, and a work email
Unfortunately, they don't match very well, and there will be no way of cleaning the data.
What I want is to merge the cols from table 1 and table 2, then the challenge I'm facing is matching them. From the samples below, I want to pull the colums A, B C....etc into table 2 where a match can be found on either, ID, Personal Email or Work Email. In the example, ID 2 matches and pulls the result, whereas Steven entered his ID wrong in table 1, so it doesn't find him, but can find a match by email.
My plan is to create a column in table 1, then using lookup checks the 3 conditions, then using coalesce, returns the first non-blank and finds the correct ID from table 2, I can then join the tables.
Heres my attempt:
and I get the error: A table of multiple values was supplied where a single value was expected.
I've tried doing a filter, or using FirstNonBlankValue, but every which way, I get some error.
Any help with this function, or approach would be appriciated
Table 1:
| ID | Personal Email | Work Email | Col A |
| 2 | Josh@email | Josh1@email | A |
| 3 | Amy@email | Amy1@email | B |
| 7 | james@email | james1@email | B |
Table 2:
| ID | Personal Email | Work Email | Col A from Table 1 |
| 2 | Josh@email | JoshB@email | A |
| 4 | james@email | james1@email | B |
| 3 | Amy@email | Amy22@email | B |
Solved! Go to Solution.
@JoshB_
I did it in a different way, please check:
Col A =
VAR _ID = [ID]
VAR _PMAIL = [Personal Email]
VAR _WMAIL = [Work Email]
RETURN
MAXX(
FILTER(
'Table-1',
'Table-1'[ID] = _ID || 'Table-1'[Personal Email] = _PMAIL || 'Table-1'[Work Email] = _WMAIL
),
'Table-1'[Col A]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@JoshB_
I did it in a different way, please check:
Col A =
VAR _ID = [ID]
VAR _PMAIL = [Personal Email]
VAR _WMAIL = [Work Email]
RETURN
MAXX(
FILTER(
'Table-1',
'Table-1'[ID] = _ID || 'Table-1'[Personal Email] = _PMAIL || 'Table-1'[Work Email] = _WMAIL
),
'Table-1'[Col A]
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Perfect, thank you.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 81 | |
| 69 | |
| 50 | |
| 46 |