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! Request now

Reply
Anonymous
Not applicable

Unexpected error: Operation is not valid due to the current state of the object.

Hi Team,

 

I am getting this error "Unexpected error: Operation is not valid due to the current state of the object".

 

What am I doing?

1. we created a function which needs 2 parameters - 1st parameter is Jira API URL & 2nd parameter is Project Key both have type = text

2. Now we have a table that contains 2 columns - 1st column is JIRA API and 2nd columns is ProjectKey. both have type = text 

3. Now we call the function and pass the column values as parameter but it gives above error.

4. So now instead of column values we tried passing the values Hardcoded values and now it returns a table - means it is working.

5. Why it is not working we pass the column name as parameter to the function?

6. We need this as we have to call this function for each row of that table. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, 

 

Finally, I found the solution to this issue.

for example: below is my function

fn_function = (a as number) =>

let 

 a = a 

in 

 

now here since on both the side we have the same variable name. it gives the error. so I changed the function to below:

fn_function = (b as number) =>

let 

 a = b 

in 

 

then the issue got solved.

 

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous 

Glad you found the solution yourself. And Thank you for share it.😀

 

 

Paul Zheng _ Community Support Team

Anonymous
Not applicable

Hi, 

 

Finally, I found the solution to this issue.

for example: below is my function

fn_function = (a as number) =>

let 

 a = a 

in 

 

now here since on both the side we have the same variable name. it gives the error. so I changed the function to below:

fn_function = (b as number) =>

let 

 a = b 

in 

 

then the issue got solved.

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.