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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
PeterNowak
Frequent Visitor

Expression.Error: <pii>There weren't enough elements in the enumeration to complete the operation

Hello guys,

 

I'm facing an issue with a pbix file which is connected to several excel files which are uploaded on one drive. The error message appeared when I changed the location of some files from my PC to the one drive. Anyone has an idea what is the root cause of that?

Below error msg:

 

Expression.Error: <pii>There weren't enough elements in the enumeration to complete the operation.</pii>. <pii>#table({"Content", "Name", "Extension", "Date accessed", "Date modified", "Date created", "Attributes", "Folder Path"}, {})</pii>. ;There weren't enough elements in the enumeration to complete the operation.. The exception was raised by the IDbCommand interface. Table: Prices.

3 REPLIES 3
PeterNowak
Frequent Visitor

@v-yingjl 

Hey,

I think the issue why the data cannot be loaded sits actually on the SP. When I changed the location of my files it looks like everything works properly. However, do you have any idea what kind of error can be this? 

 

DataSource.Error: SharePoint: Request failed: The remote server returned an error: (500) Internal Server Error. (An error occurred while processing this request.)
Details:
DataSourceKind=SharePoint
DataSourcePath=ondrivename/_vti_bin/ListData.svc/SolutionGallery
SPRequestGuid=fb50f99f-2050-3000-3c36-d7977a5bf81e
Url=https:onedrivename/_vti_bin/ListData.svc/SolutionGallery

 

Also on the SP i have 19 files and PowerBI is trying to load 20 rows into the PBIx. Any idea why (this 1 more "hidden" file is displayed as an error line)

Hi @PeterNowak ,

Consider whether the rows have got the max limitations in Power Query.

Similar threads:

  1. The remote server returned an error: (500) Internal Server Error. 
  2. Power Query (Power BI) and SharePoint Lists 
  3. SharePoint: Request failed: The remote server returned an error: (500) Internal Server Error. 

 

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

v-yingjl
Community Support
Community Support

Hi @PeterNowak ,

It depends on what you did transformations on the table. 

In addition, when you change the file path, you should change it in Power Query first to prevent data source error.

 

Similar threads:

  1. There weren't enough elements in the enumeration to complete the operation. when threre are no files 
  2. ERROR: "There weren't enough elements in the enumeration to complete the operation" 

 

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

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.