cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Split a query in two instead of having two queries

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
Highlighted
Super User IV
Super User IV

Re: Split a query in two instead of having two queries

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

Highlighted
Frequent Visitor

Re: Split a query in two instead of having two queries

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.

Highlighted
Solution Sage
Solution Sage

Re: Split a query in two instead of having two queries

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
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors