cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CubicArray
Helper I
Helper I

Split a query in two instead of having two queries

Hi all,

 

I have some xlsx files that have a header (red) and a body (blue), see below:

 

Capture.PNG

 

This is how I am handling the data:

 

Header:

  1. Import
  2. Keep first 6 rows
  3. Transpose
  4. Promote headers
  5. Combine all files

 

Body:

  1. Import
  2. Delete first 6 rows
  3. Promote headers
  4. Combine all files

 

Everything works, but I have noticed that importing the files twice doubles the size of the pbix file and the time it takes to load.

 

Is there any way I could split the process after importing everything just once? Something like:

 

Header and Body:

  1. Import file
  2. Split:
  • Keep first 6 rows
  • Transpose
  • Promote headers
  • Combine all files into Header query

 

  • Delete first 6 rows
  • Promote headers
  • Combine all files into Body query

 

What do you guys think?

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @CubicArray 

 

You can link to file once and Reference the file multiple times instead of duplicating the query.

I'm surprised that it doubles the size as you load into your model only the final step

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.
  

View solution in original post

3 REPLIES 3
Mariusz
Community Champion
Community Champion

Hi @CubicArray 

 

You can link to file once and Reference the file multiple times instead of duplicating the query.

I'm surprised that it doubles the size as you load into your model only the final step

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.
  

View solution in original post

Thanks @, I'm assuming it doubles the size...

 

The xlsx files add up to 500 MB and the pbix is a little bit more than 1 GB.

Hi @CubicArray ,

After my research, I'm afraid it couldn't achieve in Power BI for now. For your requirement, you can come up with a new idea and add your comments there to make this feature coming sooner. 

I think what you need is how to optimize your model to reduce the size of the PBIX file to improve the performance. The following resources may be helpful:

Power BI performance best practices

Power BI Performance Tips and Techniques

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.