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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Solution Authors