cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

HOW TO COPY A DATA COLUMN FROM ANOTHER TABLE!

Hi Friends

 

I need to copy a Column(with data) from one table to another .. how it is possible ?

 

Regards

1 ACCEPTED SOLUTION
Microsoft
Microsoft

Hi @SRBI ,

 

It depends on whether there is a correspondence between the two tables. If so, you can use merge query or create calculated column by RLATED function.  https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

If not, you can create index columns in both table and :

Capture12.PNGCapture13.PNG

 

Then use lookupvalue function:

 

 

Column = LOOKUPVALUE(Table2[Column1],Table2[Index],'Table'[Index])

 

 

Capture14.PNG

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

View solution in original post

3 REPLIES 3
Microsoft
Microsoft

Hi @SRBI ,

 

It depends on whether there is a correspondence between the two tables. If so, you can use merge query or create calculated column by RLATED function.  https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

If not, you can create index columns in both table and :

Capture12.PNGCapture13.PNG

 

Then use lookupvalue function:

 

 

Column = LOOKUPVALUE(Table2[Column1],Table2[Index],'Table'[Index])

 

 

Capture14.PNG

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

View solution in original post

Super User IV
Super User IV

@SRBI , In power query you have merge two table and then choose the column you need.

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

in Dax there are few way - refer to my video : https://www.youtube.com/watch?v=czNHt7UXIe8



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Super User IV
Super User IV

There are a few potential ways to do this (e.g., merge, add as custom column, use Table.FromColumns).  Please explain further with example/mock tables.

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors