This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
HI
i have the following table2
| cust | COUNTRY | Market Responsibility | Customer Market Area New |
| AE | Asia Minor | EMEA | |
| AL | South East EU | EMEA | |
| AM | Russia | EMEA | |
| AN | USA | North America | |
| AR | Other South America | South America | |
| AT | Central Europe | EMEA | |
| at99999 | AT | Italy | EMEA |
| at56432 | AT | Asia Minor | EMEA |
| at72444 | AT | Asia Minor | EMEA |
i need a formula in table1 that find the column "market responsability" in table2 with these criteria :
if the customer number in table 1 is present in column "cust" in table2 then look for the market responsability in table2
if the customer is not present, then it crosses me the column iso in table1 with column country in table2 and return the "market rasponsability" ...
sorry for my bad english 😞
thanks to all
paola
Hi Paolo,
I can understand your question just fine. You will need to perform two merges that will perform just like you described. Lookup Table1 into Table2 by customer number to cust and call this Lookup1. Now lookup Table1 into Table2 by iso to country. Expand Lookup1 into Market Responsiblity and Lookup2 into Customer Market New Area. Next put in a calculation field that will pull the Market Responsiblity if it is not null and will otherwise return the Customer Market New Area. Finally, remove the Market Responsiblity and Customer Market New Area.
Regards,
Mike
let
Source = Table1,
#"Merged Queries" = Table.NestedJoin(Source, {"customer number"}, Table2, {"cust"}, "Lookup1", JoinKind.LeftOuter),
#"Merged Queries1" = Table.NestedJoin(#"Merged Queries", {"iso"}, Table2, {"COUNTRY"}, "Lookup2", JoinKind.LeftOuter),
#"Expanded Lookup1" = Table.ExpandTableColumn(#"Merged Queries1", "Lookup1", {"Market Responsibility"}, {"Market Responsibility"}),
#"Expanded Lookup2" = Table.ExpandTableColumn(#"Expanded Lookup1", "Lookup2", {"Customer Market Area New"}, {"Customer Market Area New"}),
AddLookup = Table.AddColumn(#"Expanded Lookup2", "Lookup", each if [Market Responsibility] <> null then [Market Responsibility] else [Customer Market Area New]),
#"Removed Columns" = Table.RemoveColumns(AddLookup,{"Market Responsibility", "Customer Market Area New"})
in
#"Removed Columns"
Hi @Anonymous ,
Not quite sure what exactly the issue is here. You may want to type it up in your language and use Google to translate. I find it works quite well.
Thank you.
Nathaniel
Proud to be a Super User!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.