Forum Discussion
outteach
1 month 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:",...
- 1 month ago
Hard to tell without a data sample. But if your list is coming from a nested table, and there are nulls in that list (in the column of the nested table), you will see that error.
You can correct for it by changing the comparer to handle nulls:(x,y)=> Text.Contains(x ?? "",y))?? is the coalesce operator and will convert null to an empty string.
If that is not the issue, please provide a sanitized example of the actual list you are feeding into the formula. Be sure when you sanitize it that it still reproduces the error.
ZhangKun
Super User
1 month agouse List.FindText instead of List.PositionOf