Forum Discussion

monojchakrab's avatar
monojchakrab
Resolver III
3 years ago
Solved

Insert column in Tables, using values from another column

Hiya good people,

 

I am trying to solve, possibly a wierd problem. I have a table as below :

 

What I want to do is as follows :

 

In each of the table under the [Data] column, i want to insert a column which will populate the new column with the corresponding name under the column [Account]. E.g. In the 1st table, from the [Data] column, I would like to insert a column, filled with the account name, "JioMart"

 

If I simply use Table.AddColumn, I am getting an error.

 

Is there a way to solve this in power query?

 

Any help much appreciated

  • NewStep=Table.ReplaceValue(PreviousStepName,each [Account],"",(x,y,z)=>Table.AddColumn(x,"Account",each y),{"Data"})

3 Replies