Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
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
Can someone clarify if there is any dfference between these to for examaple
= let alist = {"a","b","b","c","d","e"} , rlist = {"b","d","c"}
in
List.RemoveMatchingItems( alist , rlist )
= let alist = {"a","b","b","c","d","e"} , rlist = {"b","d","c"}
in
List.RemoveItems( alist , rlist )so looking at docs, it seems to suggest that with Matching only 1 "b" would be removed, but this does not seem to be the case,
can anyone help with how these to differ , if they do?
Solved! Go to Solution.
The difference is that List.RemoveMatchingItems supports an optional equationCriteria function where you can define what "matching" means.
Hey!
Like @lbendlin says with List.RemoveMatchingItems you have a little more control on how he sees matches. For example, if you have a list that randomly has some Uppercase and lowercase words, you can use a comparison criteria to make power query ignore Uppercases. See the code below:
let
// our list of names
Source = {
"Luke", "Leia",
"C3PO", "R2D2",
"Darth Vader", "Anakin Skywalker",
"Leia", "Chewbacca"
},
// the list with characters we want to remove
RemoveList = {
"r2d2",
"LEia"
},
// with Comparer.OrdinalIgnoreCase we can ignore all the uppercase letters so he matches correctly
Result = List.RemoveMatchingItems(
Source,
RemoveList,
Comparer.OrdinalIgnoreCase
)
in
Result
Hopefully this explains it!
Hey!
Like @lbendlin says with List.RemoveMatchingItems you have a little more control on how he sees matches. For example, if you have a list that randomly has some Uppercase and lowercase words, you can use a comparison criteria to make power query ignore Uppercases. See the code below:
let
// our list of names
Source = {
"Luke", "Leia",
"C3PO", "R2D2",
"Darth Vader", "Anakin Skywalker",
"Leia", "Chewbacca"
},
// the list with characters we want to remove
RemoveList = {
"r2d2",
"LEia"
},
// with Comparer.OrdinalIgnoreCase we can ignore all the uppercase letters so he matches correctly
Result = List.RemoveMatchingItems(
Source,
RemoveList,
Comparer.OrdinalIgnoreCase
)
in
Result
Hopefully this explains it!
The difference is that List.RemoveMatchingItems supports an optional equationCriteria function where you can define what "matching" means.
Thank you both ,
Richard.
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 |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |