Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to get derived string recognized as column name. List.Last(Table.ColumnNames(...

Dear all, I´m new to this forum, but a lot of posts could already help me with my Power Query ambition. Thanks´s a lot for that. Now, for my last problem I couldn´t find a solution (or rather don´t...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous 

     

    If I understand correctly, you want to find your last column which is a table, then pass the column name as a variable to get the first row, try it

    Table.AddColumn(#"Expand all - dynamically", "First row only", each Table.FirstN(Record.Field(_,List.Last(Table.ColumnNames(#"Expand all - dynamically"))),1))