Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Hello @Anonymous ,
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
7 | |
7 | |
6 | |
6 |