Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
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
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
13 | |
12 | |
11 | |
8 |
User | Count |
---|---|
43 | |
26 | |
16 | |
15 | |
12 |