Forum Discussion
outteach
4 hours agoNew Member
Power Query - Nested table - List.PositionOf - Find substring
This line of M code works perfectly...
RowIndexOfCashFlow = Table.AddColumn(AddTableWithIndex, "Row Index of Cash Flow", each List.PositionOf([Data][Column3], "Cash Flow Analysis - Checking *7114:", Occurrence.First))
...but I would like to search for the substring "Cash Flow" and not the entire text. What do I need to do in order to accomplish that?
1 Reply
- ronrsnfldSuper User
You can use the 4th argument:
List.PositionOf(Source, "Cash Flow", Occurrence.First, (x,y)=>Text.Contains(x,y))If you use Occurrence.All, it will return a list of positions.