Add Custom Column with Value from another list or table

jilbobagins

Member
Joined
Apr 11, 2019
Messages
80
Reaction score
0
Points
6
Excel Version(s)
2016
Howdi,

I've a workbook where I want the Value of a single Cell to be added as a custom column to a large table of data, how do you refer to a column/row in another table??

No example, but I could soon whip something up..

Thanks
 
This technique is really slow, so I do not recommend it for large tables. But is this what you are looking for?

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
// Retrieve first record of Table1, field Calc2 and repeat it for every record
    AddOtherTableRef = Table.AddColumn(Source, "OtherTable", each Table1[Calc2]{0})
in
    AddOtherTableRef

Performance can be improved by buffering. But, you are usually much better off merging against the data and then retrieving the value.

Regards,
Mike
 
Thanks Mike, i'll give that a try and report back!
 
Back
Top