Results 1 to 3 of 3

Thread: Add Custom Column with Value from another list or table

  1. #1
    Acolyte jilbobagins's Avatar
    Join Date
    Apr 2019
    Posts
    49
    Articles
    0
    Excel Version
    2016

    Add Custom Column with Value from another list or table



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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

  2. #2
    Acolyte cyborgski's Avatar
    Join Date
    May 2019
    Posts
    60
    Articles
    0
    Excel Version
    Office 365
    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

  3. #3
    Acolyte jilbobagins's Avatar
    Join Date
    Apr 2019
    Posts
    49
    Articles
    0
    Excel Version
    2016
    Thanks Mike, i'll give that a try and report back!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •