Forum Discussion
jhsimb
2 years agoFrequent Visitor
List.Contains() is slow
I tried to filter a column based on a list I used List.Contains() but it is very slow = Table.SelectRows(Medidas, each (List.Contains(Resta,[Cliente])=true )) Please your help with a faster ...
AlienSx
2 years agoSuper User
jhsimb we don't see what is Resta. If it's a result of some transformation/calculation then try to List.Buffer it beforehand. I would also give a try to List.PositionOf alternative with Occurrence.First like this:
= Table.SelectRows(Medidas, each List.PositionOf(Resta_buffered, [Cliente], Occurrence.First) <> -1 ) where Resta_buffered = List.Buffer(Resta) outside of your expression.
jhsimb
2 years agoFrequent Visitor
Rest is a table. A table that was transformed in a list using Convert to List.
How do I use List.Buffer in this case?
Thanks