cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Fitin1rb Regular Visitor
Regular Visitor

Merging data from one table to another

Hello - 

 

I have 2 tables in my model that I am trying to 'merge' the data together.  I am looking to pull one data element from Table1 and put it in Table2.  The two tables have a relationship based on the Transaction ID (but both tables are joined to a calendar table so I cannot make this relationship active).  The tables are very large, so I do not really want to use a calculated column in the table.

            Table 1			                     Table 2	
Transaction ID	Asset		Transaction ID	  Approval Date
AAA123	        1		     AAA123	    1/1/2018
AAA123	        2		     AAA345	     2/1/2018
AAA123	        3			
AAA345	        4 			

So I am trying to get the approval dates into Table1 the most efficient way possible, without causing performance issues in my report.  (Table 1 has millions of rows of data).

 

Thanks for any help

Ryan 

1 ACCEPTED SOLUTION

Accepted Solutions
Kasunpathirana Regular Visitor
Regular Visitor

Re: Merging data from one table to another

If the tables are not linked with the relationship then you can use below method 

 

LOOKUPVALUE = LOOKUPVALUE(Table2[Approval Date],Table2[Transaction ID],Table1[Transaction ID])

 

Hope this helps Smiley Happy

 

Lookup value.png

View solution in original post

3 REPLIES 3
Kasunpathirana Regular Visitor
Regular Visitor

Re: Merging data from one table to another

Use the function Related = RELATED(Table2[Approval Date])

 

Related.png

 

Hope this helps Smiley Happy 

Fitin1rb Regular Visitor
Regular Visitor

Re: Merging data from one table to another

Hey @Kasunpathirana I cannot get this to work because the relationship between the 2 tables is not active.  Power BI will not let me make it active due to both tables being joined to the Calendar table.

Kasunpathirana Regular Visitor
Regular Visitor

Re: Merging data from one table to another

If the tables are not linked with the relationship then you can use below method 

 

LOOKUPVALUE = LOOKUPVALUE(Table2[Approval Date],Table2[Transaction ID],Table1[Transaction ID])

 

Hope this helps Smiley Happy

 

Lookup value.png

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 246 members 2,636 guests
Please welcome our newest community members: