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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bbbt123
Helper I
Helper I

merge queries vs merge queries as new

Hello,

 

I have 2 databases, both with 1.5 millions rows. I have merged them as new table and I have disabled "enable load" in the two original tables. if I had merged them without creating a new one, would my database be "lighter"? or having disabled the load in the original tables will make the overall file lighter anyway?

 

Thank you in advance

1 ACCEPTED SOLUTION
zoloturu
Memorable Member
Memorable Member

Hi @bbbt123 ,

 

You think right - disable load of two source tables will make file lighter. There is another option which can provide similar or even a little bit better result. The logic is to put all code to one query. 

 

In more details. Go to your new query which is a merge of two other. Let's name them Table1 and Table2. Both secondary queries have some PowerQuery code behind, move it to the main query as below:

 

let
   Table1 = let ... in ... ,
   
   Table2 = let ... in ... ,
   
   Result = Table.Combine({Table1, Table2})
in
   Result

 


Regards,
Ruslan Zolotukhin (zoloturu)
BI Engineer at Akvelon Inc. / Kharkiv Power BI User Group Leader / DAX & Power BI Trainer
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!

You are from Ukraine? If yes then welcome to Power BI User Group - KhPUG website. Other country? Check and find proper one - Power BI User Groups

View solution in original post

3 REPLIES 3
zoloturu
Memorable Member
Memorable Member

Hi @bbbt123 ,

 

You think right - disable load of two source tables will make file lighter. There is another option which can provide similar or even a little bit better result. The logic is to put all code to one query. 

 

In more details. Go to your new query which is a merge of two other. Let's name them Table1 and Table2. Both secondary queries have some PowerQuery code behind, move it to the main query as below:

 

let
   Table1 = let ... in ... ,
   
   Table2 = let ... in ... ,
   
   Result = Table.Combine({Table1, Table2})
in
   Result

 


Regards,
Ruslan Zolotukhin (zoloturu)
BI Engineer at Akvelon Inc. / Kharkiv Power BI User Group Leader / DAX & Power BI Trainer
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!

You are from Ukraine? If yes then welcome to Power BI User Group - KhPUG website. Other country? Check and find proper one - Power BI User Groups

HI @bbbt123 , @Adamtall ,  @zoloturu

I have similar situation. @bbbt123  which approach did you you use? 

Adamtall
Resolver III
Resolver III

Hi,

 

The refresh need to check both tables, so the load will take the same time.

but when it have refreshed the PBI file will only save the rows from the one table that have "enable load".

So the file will be lighter with disabled "enable load" on the orginal tables.

But if you merge with one of the 2 tables and disabled "enable load" on the not merged table it will be same as above.

 

But I think its more clean to have groups Extract/Transform/Load stages in the datamodel. 

So the extract has only raw data and in transform in this case has the merge "as a new table".

This will help others too understand the datamodel faster and work on the same model.

 

/Adam

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors