mhecben's avatar
mhecben
New Member
10 years ago
Status:
Needs Votes

Relative or positional column references

Refer to columns by means other than the header. Like the RC cell references in Excel, let's have a way to say "Delete the 3rd column" whether or not it's named "Column 3." This could be limited in scope to the Choose Columns and Rename commands.

3 Comments

  • Thanks for the feedback - Note that this can be done today based on M formula tweaks. There's a Table.ColumnNames function that you can use on any table and will return a list of column names (sorted by "natural order"). So, to reference "the second column of a table" you could use Table.ColumnNames(yourTable){1} For example, this formula removes the second column of the table: = Table.RemoveColumns(yourTable,{Table.ColumnNames(yourTable){1}})

Recent ideas