Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How To Copy a Column from One Table to a New Table

I have a column in one table I am trying to copy over to a new table. I do not have existing relationships and there is no 'index' column in my original table. 

 

How do I copy that one column over to a new table? 

 

Thank you!

  • Hi, Anonymous ;

    In data view, you could copy column or copy table. then paste it.

    1.copy column.

    2.paste it.

    3.or in table b ,you could paste in power query.


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Anonymous ;

    In data view, you could copy column or copy table. then paste it.

    1.copy column.

    2.paste it.

    3.or in table b ,you could paste in power query.


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler Thank you. I can't seem to figure out LOOKUPVALUE... let's say I have a table and column like so: TableA[Col1]... what is the proper command to copy this column into the new table? 

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Going to need more information. You have to have some way of identifying which row value from that table goes into which row in the other table. Or you could potentially try merging the tables in Power Query. Just not enough to go on in order to answer your question.

     

    Sorry, having trouble following, can you post sample data as text and expected output?
    Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

    Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler Sorry about that. Let's say the table I want to take the column from is called TableA and the Column from the table is called Col1. I want to copy that whole column to a new table (let's name it Table2). Is there a simple way to do that?

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Anonymous Well, if all you want in that Table2 is that column data, you can create a new calculated table in Power BI Desktop (not Power Query) and use SELECTCOLUMNS. SELECTCOLUMNS('TableA', "Col1", [Col1])