Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Fitin1rb
Helper III
Helper III

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

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
Resolver I
Resolver I

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

 

Related.png

 

Hope this helps Smiley Happy 

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.

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.