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
Dear All
I would like to merge these two queries based on Product Line and Commodity Name. The Fuzzy option didn't work for me. As you can I have specific text that is identical. Would like help on how I could merge the two queries and have an added column in Query 1 that brings me the Commodity Code in Query 2.
Query 1
Query 2
Results should be as follows:
Solved! Go to Solution.
At threshold level of 0.2, it will match. See the sample code
Query1
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Zcw7CoAwEEXRrQxT27kCEdQmKFhKikFfJJCPZNw/ijaC9T3cZeEOUQK44lZOpWkaZ2pSYlt9kpE9Qf0JknWFai4e+hDzgiFHUHOUnMgBG8o/xiN451GUerlHNVt7AQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Gender = _t, #"Product line" = _t]),
#"Merged Queries" = Table.FuzzyNestedJoin(Source, {"Product line"}, Query2, {"Commodity Name"}, "Query2", JoinKind.LeftOuter, [IgnoreCase=true, IgnoreSpace=true, NumberOfMatches=1, Threshold=0.2]),
#"Expanded Query2" = Table.ExpandTableColumn(#"Merged Queries", "Query2", {"Commodity Code"}, {"Commodity Code"})
in
#"Expanded Query2"
At threshold level of 0.2, it will match. See the sample code
Query1
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Zcw7CoAwEEXRrQxT27kCEdQmKFhKikFfJJCPZNw/ijaC9T3cZeEOUQK44lZOpWkaZ2pSYlt9kpE9Qf0JknWFai4e+hDzgiFHUHOUnMgBG8o/xiN451GUerlHNVt7AQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Gender = _t, #"Product line" = _t]),
#"Merged Queries" = Table.FuzzyNestedJoin(Source, {"Product line"}, Query2, {"Commodity Name"}, "Query2", JoinKind.LeftOuter, [IgnoreCase=true, IgnoreSpace=true, NumberOfMatches=1, Threshold=0.2]),
#"Expanded Query2" = Table.ExpandTableColumn(#"Merged Queries", "Query2", {"Commodity Code"}, {"Commodity Code"})
in
#"Expanded Query2"
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 |