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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syauqi
Regular Visitor

Data source error: Expression

I face an error below when I do schedule refresh, I already prepared dataset with several elements below and not a single one is missed. But I always face this error.

 

Data source error: Expression.Error: There weren't enough elements in the enumeration to complete the operation.. #table({"Content", "Name", "Extension", "Date accessed", "Date modified", "Date created", "Attributes", "Folder Path", "Category", "Year", "Project Type", "Project Folder Name", "ProjectName", "Brand"}, {}). Microsoft.Data.Mashup.ErrorCode = 10063. Detail = #table({"Content", "Name", "Extension", "Date accessed", "Date modified", "Date created", "Attributes", "Folder Path", "Category", "Year", "Project Type", "Project Folder Name", "ProjectName", "Brand"}, {}). ;There weren't enough elements in the enumeration to complete the operation.. The exception was raised by the IDbCommand interface. Cluster URI: WABI-NORTH-EUROPE-redirect.analysis.windows.net Activity ID: 4b8399d2-bf3f-493e-af1e-752b1fb9e6aa Request ID: 88722c48-abc5-49ff-955a-f211d32ebccc Time: 2025-11-20 09:29:40Z

1 ACCEPTED SOLUTION
Zanqueta
Solution Sage
Solution Sage

Hi @Syauqi,

The error message:
Expression.Error: There weren't enough elements in the enumeration to complete the operation.
indicates that Power Query is attempting to construct a table using #table(...) with a defined set of columns, but the list of rows provided is either empty or incorrectly structured. Even if all column headers are present, Power BI expects each row to contain the same number of elements as there are columns.

 

 

My first suggestion: Try remove this part, after Brand field:  "Brand"}, {}


If dont work:

Recommended Approach

  1. Validate the structure of the row data before constructing the table.
  2. Ensure each row contains the correct number of elements corresponding to the column headers.
  3. Use conditional logic to handle empty or malformed data, for example:

 

let
    rows = {...}, // list of lists containing data
    table = if List.IsEmpty(rows) then
        #table({"Column1", "Column2"}, {})
    else
        #table({"Column1", "Column2"}, rows)
in
    table


Maybe, if you could share part of your M script can be more helpfull.

If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.

Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.

View solution in original post

3 REPLIES 3
Zanqueta
Solution Sage
Solution Sage

Hi @Syauqi,

The error message:
Expression.Error: There weren't enough elements in the enumeration to complete the operation.
indicates that Power Query is attempting to construct a table using #table(...) with a defined set of columns, but the list of rows provided is either empty or incorrectly structured. Even if all column headers are present, Power BI expects each row to contain the same number of elements as there are columns.

 

 

My first suggestion: Try remove this part, after Brand field:  "Brand"}, {}


If dont work:

Recommended Approach

  1. Validate the structure of the row data before constructing the table.
  2. Ensure each row contains the correct number of elements corresponding to the column headers.
  3. Use conditional logic to handle empty or malformed data, for example:

 

let
    rows = {...}, // list of lists containing data
    table = if List.IsEmpty(rows) then
        #table({"Column1", "Column2"}, {})
    else
        #table({"Column1", "Column2"}, rows)
in
    table


Maybe, if you could share part of your M script can be more helpfull.

If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.

Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.

Hi @Syauqi ,
Thanks for reaching out to the Microsoft fabric community forum. 

 

I would also take a moment to thank  @Zanqueta  , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you .

 

 

Best Regards, 
Community Support Team  

Hi @Syauqi ,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you .

 

 

Best Regards, 
Community Support Team  

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.