March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I have a table with more than ten thousand rows,
And 2 lists of criteria, each with up to fifty cells
I thought of using the code below.
Is there a better, more elegant way?
Thanks in advance
Best regards
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Supplier", Int64.Type}, {"Product", type text}, {"Réf", Int64.Type}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each List.Contains(List.Buffer(Criteria1),[Supplier])=true and List.Contains(List.Buffer(Criteria2),[Réf])=true)
in
#"Filtered Rows"
SupplierProductRéf
401001 | A | 2 |
401001 | A | 3 |
401001 | A | 1 |
401002 | B | 4 |
401002 | B | 5 |
401001 | B | 3 |
401001 | C | 1 |
401004 | C | 8 |
401004 | D | 2 |
401004 | D | 1 |
401003 | A | 2 |
401004 | F | 2 |
Solved! Go to Solution.
Looks good--but you don't need the "=true" in either place.
--Nate
Hello @watkinnc ,
Thank you for your reply and your comment
I'm going to use this code and remove the true operator
Best regards
Looks good--but you don't need the "=true" in either place.
--Nate
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.