Forum Discussion

npust333's avatar
npust333
New Member
2 years ago
Solved

Dynamically use IF statement to update a variable

Hello, I have a use case that I would like some help with Every period, I will receive a PDF statement, and my task is to extract the content of that PDF and populate it to Excel. The problem is, ...
  • AlienSx's avatar
    AlienSx
    2 years ago
        pos = List.PositionOf(
            Table.ToRows(Source),
            "Name",
            Occurrence.First, 
            (x, y) => List.Contains(x, y)
        )

    finds first occurrence of "Name" in ANY column. If you really want narrow your search by first 2 columns (and make it less dynamic) then make this change in the code: List.Contains(List.FirstN(x, 2), y)