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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Manohargon
New Member

how to bring in data from a database by using data in another database

I have 2 different database. the table in first database has 12 million records and table in second database has 0.6 million records.

I need to bring in 0.6 million records from first database using a key column from the second database. how do i do this. I used a custom function and it is taking lot of time.

i also need to compare the data from both database and build a report to show the differences. 

Please help with some options

2 REPLIES 2
Manohargon
New Member

Thanks for you reply.

 

I don't want to bring in all 12 million records as it consumes time and the pbix file is limited to 1 gb.

i used custom function to bring in only 0.6 million record out of 12 million records but it is consuming time.

Is there an alternate solution to bring in only 0.6 million records or how to reduce the time that custom function is taking to fetch the data

zenisekd
Super User
Super User

I would simply use power query - use import to pull the tables from both databases and then use merge (depending on the needs I would pick the join I need) by the key column. Make sure you are pulling only the columns and rows you need before the merge. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.