donkey shrek
New Member
- Joined
- Nov 15, 2022
- Messages
- 26
- Office Version
- 365
- Platform
- Windows
If I use Text.Contains to have 1 filter only, it works fine (e.g. only those containing "@").
However, I want to combine the filters into 1 query so there won't be so many steps. Therefore, I'm using List.ContainsAny instead.
I think it's because PQ cannot pick up List.Accumulate's "current" if you put it inside a list?
Current Output:
Empty list
Source List:
However, I want to combine the filters into 1 query so there won't be so many steps. Therefore, I'm using List.ContainsAny instead.
I think it's because PQ cannot pick up List.Accumulate's "current" if you put it inside a list?
Power Query:
= List.Accumulate(Source[Email],
{},
(state, current) => if List.ContainsAny({current}, {"@", ".", "gmail"}) then List.InsertRange(state, List.Count(state), {current}) else state
)
Current Output:
Empty list
Source List:
Last edited: