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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.