Forum Discussion
Unexpected error: Operation is not valid due to the current state of the object
- 6 years ago
Hi, Bessonnizza
I'd like to suggest you check if the data source's status is ok. The error message usually means the file is corrupted. You may try to start from scratch after you have checked the data source. If it still doesn't work, please open a support ticket here .
Here is a similar thread you may refer to.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I hope this helps someone but in my case this was resolved after I apply the function "Text.From" once I called the column in the invoke function . Also as others I tried to invoke the function with static strings.
First I tested the funtion as it is:
=CustomInvokedFunction("Mexico","2023-06-30","Omar")Then I tried to iterate for each row with also STATIC VALUES.
= Table.AddColumn(#"Filtered Rows", "CustomColum", each CustomInvokedFunction("Mexico","2023-06-30","Omar"))Then try to call the column (this is when it was crashing):
= Table.AddColumn(#"Filtered Rows", "CustomColum", each CustomInvokedFunction([Site],[Date],[Name]))
Then I changed with the Text.From function (my solution):
= Table.AddColumn(#"Filtered Rows", "CustomColum", each CustomInvokedFunction(Text.From([Site]),Text.From([Date]), Text.From([Name])))
I dont know why power by doesnt identify the column called as text. But for me this worked!!