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
Hi Everyone,
Wanted just to ask to the community here, if you think is possible to make a conditional merging with 2 lookup tables.
Let's say I have a data table and in this table a column (Address) with a list of addresses, but no country, only city, so I want to add a second column with the country. This information is available to me but in 2 separated lookup tables in one some addresses and in another other addresses, in the lookup tables, each address has its country in a separate column, and, I want to program the M code so that if the address of data table matches the address of lookup table1, then it gives me the country from lookup table 1, if there is no match, the code sees if there is the match in lookup table 2, if yes, then it gives me the country from lookup table 2, if also here no match for my address, then, either it leaves it blank or it writes a simple "-".
Was wondering what you think about it/if anyone thinks it is doable?
Thanks!
Stefano
You can do both merges and then coalesce the two country columns into a single column.
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 |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |