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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
wherdzik
Helper III
Helper III

PowerQuery Refreshing for a Long Time

I have a PowerQuery that connects to multiple excel worbooks to a sheet called PHYS in each workbook.  Just yesterday It seems that I started to encounter issues.  I am refreshing the query and its taking a long time but I also see an issue in the Transform Sample File.  Not sure what the issue is but it is taking forever to refresh the query. Does anyone know what to do in order to resolve this? Usually it take a bit to refresh but its just going on and on..

 

It looks like it starts spinning on the invoke custom function here:

wherdzik_0-1696460398375.png

 

Here are other screenshots that may or may not be helpful but please let me know if I can provide other ones to help.

wherdzik_0-1696459740775.png

 

wherdzik_1-1696459908827.pngwherdzik_2-1696459978463.pngwherdzik_3-1696460074526.png

 

wherdzik_4-1696460149318.png

 

3 REPLIES 3
lbendlin
Super User
Super User

The method you used will read the first file twice.  If you want to avoid that you can roll your own processing function to ingest the PHYS sheets from all the workbooks.

 

From the looks of your code some of the steps can probably be combined or rearranged.

 

You can use Query Diagnostics to find out which step takes the longest.

I am a self taught PowerQuery user so I am certain I am super innefficient at this.  Can you point me how to make this more efficient.  You said you can roll your own processing fnction to ingest the Phys sheets.  Can you point me to some literature so I can read to perform an effecient way to grab specific worksheet in multiple workbooks in a folder.  Maybe I can learn from an example?  Thank you for responding.

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.

Top Kudoed Authors