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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
OZMckenzie
Helper I
Helper I

query.Expression.Error.. there weren't enough elements in the enumeration...detail [Table]

Hello,

 

This issue seems has been asked several times in this forum, but I haven't found any solution workable to my question, so I am posting here: 

 

I am creating a function by duplicating one query, and modifiy the query steps by advanced editor. The purpose is to apply the same query steps to another worksheet in another Excel workbook.

 

In the advanced editor, I added "quartername" as the parameter, which is the file name of the Excel workbook. However when I input the name of the workbook and the click "invoke", an error message pops-up as "query. Expression.Error. Snapshot as below. I wonder what caused the error? The details only show [Table] which I don't quite understand.

 

Both workbooks contain several worksheets, but my target sheets are both called "quality data". And the format of both "quality data" are identical. BTW, the file name of the Excel workbook contains Korean character. 

 

Please kindly advise any thoughts or comments, thank you so much!

 

Capture-invoke error message.PNG

Capture-adv editor2.PNG

 

 

 

 

1 ACCEPTED SOLUTION

Hi @OZMckenzie ,

 

Try this on #"Filtered Rows2" step:

(each [Name] = quartername)

 

Instead of string value, use the parameter defined as text,



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

4 REPLIES 4
camargos88
Community Champion
Community Champion

@OZMckenzie ,

 

It looks like you are not using the parameter quartername, only the string "quartername" for the SelectRows function.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Hi @camargos88 ,

 

Thank you so much for response, may I know how I should fix the function?

Thanks!

Hi @OZMckenzie ,

 

Try this on #"Filtered Rows2" step:

(each [Name] = quartername)

 

Instead of string value, use the parameter defined as text,



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Hi @camargos88 ,

 

It works after I removed the quotation mark, thanks for your great advice!

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.