Table.Addcolumn

MikeManwaring

New member
Joined
Apr 19, 2016
Messages
8
Reaction score
0
Points
0
Hi All
I hope someone can point me in the right direction.
I am effectively trying to create an addcolumn list and contents of those column from a second list but it does not work.
Is there any resources i can read to achieve this result?
many thanks
Mike
 
Hi Mike,

Do you have a small sample you can upload, and can you include a table with the format you want at the end? (Only needs to be 6-10 rows, but would make it a lot easier to figure out what you are trying to accomplish.)

Thanks!
 
Hi Ken
thank you for the response.
I don't have a particular table but i will explain further.

If i have a query of say 5 columns and i know that the output needs a static 25 columns of data, even if some of these columns are blank.
what i was trying to do was create a list which consisted of the column names.

myNewColumns
A
B
C
D
etc

myNewColumnContents
null
null
test
156
etc

and based on the formula

Table.AddColumn(table as table, newColumnName as text, columnGenerator as function, optional columnType as nullable type)

I tried Table.AddColumn(#"previous step", myNewColumns, each myNewColumnContents) which gave an error.

Any ideas or have you already done this?

Regards
Mike
 
Hi

I think Ken meant you to upload a sample file ( showing what you have and expected results)

Have a look at this to see how it works
 
Back
Top