Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I've a query that I need to filter by a column based on a value list.
I'd like to avoid to repeat more times "equals to" + "or" + "equals to" + "or" operations to implement a such filter.
Does it exist a simplified manner to perform that a column value could be equals to one of the values belonging to a list?
Thanks
Solved! Go to Solution.
Hi @Anonymous
You can use List.Contains, put the numbers in a list - I put the values in the list exlist
Table.SelectRows( #"Changed Type", each not List.Contains(exList,[Column1]))
Hi @Anonymous
You can use List.Contains, put the numbers in a list - I put the values in the list exlist
Table.SelectRows( #"Changed Type", each not List.Contains(exList,[Column1]))
Hi Vera,
thanks for your reply.
I've used the statement without "not" operator, to maintain the rows that match with the list.
But it seems that the performance of the data transformation logics are worsened after adding List.Contains.
Any idea?
Try adding ad step before the List.Contains step where you buffer the exList
For example - #"New Step" = List.Buffer(exList)
And then use #"New Step" instead of exList in your query. Note the List.Buffer needs to be in the same query as described.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
53 | |
21 | |
12 | |
12 |