Forum Discussion
cgkas
Helper V
3 years agoHow to add list to table in single step?
Hi all, I have this code = Table.AddColumn(
Table.FromRecords({[A = 1],[A = 2],[A = 3],[A = 4]}), //Column "A"
"NewData", // New column name
each ...
- 3 years ago
I wish I knew a better way but here's one possible method:
let Source = Table.FromRecords({[A = 1],[A = 2],[A = 3],[A = 4]}), z = {"b",4,7,"av"}, AddCol = Table.FromColumns(Table.ToColumns(Source) & {z}, Table.ColumnNames(Source) & {"NewData"}) in AddCol
AlexisOlson
Super User
3 years agoI wish I knew a better way but here's one possible method:
let
Source = Table.FromRecords({[A = 1],[A = 2],[A = 3],[A = 4]}),
z = {"b",4,7,"av"},
AddCol = Table.FromColumns(Table.ToColumns(Source) & {z}, Table.ColumnNames(Source) & {"NewData"})
in
AddCol