power query M language accessing Key (name/value) in a record

Viewed 36

We can access table rows as they are lists with the syntax below.

#tableName{index}

It returns us a key-value pair in record format. Now I want to access the column name which is 'key' without copying and pasting the column name.

Is it possible in the M language?

Yes, with help of user @Storax I was able to achieve what I needed: To take value of Column name; Below is code. Thanks to Storax

Table.Column(
   Table.DemoteHeaders(Source),
      Table.ColumnNames(Table.DemoteHeaders(Source)){0}){0}
0 Answers
Related