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
Hello Power BI community,
I am provided with a list WAREHOUSE that contains products with multiple SKU codes associated with each product.
WAREHOUSE
| Name | Warehouse SKU | Supplier SKUs |
| Product 1 | ABCDE | 12345, 23456, 34567 |
| Product 2 | VWXYZ | 45678, 56789 |
I then have a table BROCHURE where the product naming is different, but they are identified by one SKU number for each product. For each product, that SKU number will be one of the many codes in the preceding WAREHOUSE table.
BROCHURE
| Name | SKU |
| Product A | 12345 |
| Product B | 56789 |
My desired outcome would be to have a custom column in BROCHURE that returns "ABCDE" for SKU "12345" and "VWXYZ" for SKU "56789".
Splitting the columns in WAREHOUSE with delimiters is not ideal, I would prefer a solution within Power Query using text.Contains, sort of like a Vlookup with Excel using "*"&12345&"*".
Thank you in advance!
Solved! Go to Solution.
Hi @jaliu1290
You can achieve this in Power Query by adding a custom column to your BROCHURE table that looks up the corresponding Warehouse SKU from the WAREHOUSE table without splitting the Supplier SKUs column. Here's how:
Ensure both tables are loaded into Power Query:
In the BROCHURE table:
Create the Custom Column:
Column Name: Enter Warehouse SKU (or your preferred name).
Formula: Paste the following code:
= let
MatchedRow = Table.SelectRows(
WAREHOUSE,
(WarehouseRow) => Text.Contains(
WarehouseRow[Supplier SKUs],
Text.From([SKU]),
Comparer.OrdinalIgnoreCase
)
)
in
if Table.RowCount(MatchedRow) > 0 then
MatchedRow{0}[Warehouse SKU]
else
null
Explanation:
Finalize:
This method allows you to perform the lookup without splitting the Supplier SKUs column and effectively replicates the VLOOKUP functionality you're familiar with in Excel.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn|Twitter|Blog |YouTube
Hi @jaliu1290
You can achieve this in Power Query by adding a custom column to your BROCHURE table that looks up the corresponding Warehouse SKU from the WAREHOUSE table without splitting the Supplier SKUs column. Here's how:
Ensure both tables are loaded into Power Query:
In the BROCHURE table:
Create the Custom Column:
Column Name: Enter Warehouse SKU (or your preferred name).
Formula: Paste the following code:
= let
MatchedRow = Table.SelectRows(
WAREHOUSE,
(WarehouseRow) => Text.Contains(
WarehouseRow[Supplier SKUs],
Text.From([SKU]),
Comparer.OrdinalIgnoreCase
)
)
in
if Table.RowCount(MatchedRow) > 0 then
MatchedRow{0}[Warehouse SKU]
else
null
Explanation:
Finalize:
This method allows you to perform the lookup without splitting the Supplier SKUs column and effectively replicates the VLOOKUP functionality you're familiar with in Excel.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn|Twitter|Blog |YouTube
what's the expected output if ABCDE also have SKU 56789?
| Name | Warehouse SKU | Supplier SKUs |
| Product 1 | ABCDE | 12345, 23456, 34567,56789 |
| Product 2 | VWXYZ | 45678, 56789 |
Proud to be a Super User!
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!