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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Invoke Custom Function on Table (previous Step)

i have a custom function. it takes a Table as input

 

when I invoke it, it gives me the option of a Column Name or a "Table" which is another query.  I want to invoke using the previous Step as my Table.  is this possible, if not what is best practice to apply a custom function mid -way through steps

 

thanks

7 REPLIES 7
rubayatyasmin
Community Champion
Community Champion

Hi, @Anonymous 

 

If your function requires a table as input, ensure that the output of the previous step is indeed a table. If it's not, you might need to adjust your query steps to make sure it is.


After adjusting the steps invoke your function. 

 

myFunction(previous_step)

Just replace 'previous_step' with the name of the actual step, you want to refer to.

 

Did I help? If yes, hit 👍 and accept this answer as a solution

Thanks


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Anonymous
Not applicable

thanks, this is what my previous step  looks like (screenshot)

 

looks like a Table to me.  but when I invoke my funtion  #"MA Conversion"(#"Changed Type")

i get error. An error occurred in the ‘’ query. Expression.Error: The column 'Assigned' of the table wasn't found.
Details:
Assigned

 

but if you notice (in the screenshot) the Table does have column "Assigned".  if its not being recognized as a Table, how do i convert to Table, or what needs to be done.  thanks for assistance

 

mts_0-1689522860678.png

 

If the "#"Changed Type" step doesn't result in a table, you can use the Table.FromRecords function to convert it into a table.

 

#"Converted to Table" = Table.FromRecords(#"Changed Type"),
#"Invoked Function" = #"MA Conversion"(#"Converted to Table")

 

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Anonymous
Not applicable

the screenshot i posted is the previous step.  it looks like a table, does it look like a table to you?

 

it even has the Table icon in upper left corner, 

It does look like a table. Without further detail, I won't be able to solve the problem. If you create a demo file and upload it here. I will try to solve it

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Anonymous
Not applicable

thanks for the time, cant create a exact replica, its work related....   anyway to tell its a Table not only visually but that PQ recognizes as a Table that you might know of?

You can try converting again using Table.FromRecords. See if it works. I do not know any other options. Sorry


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.