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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Taurus
Frequent Visitor

Column of type "Function.Type" in Enter Data functionality

  Hi all!

 

  I'm about to create custom table using Enter Data with this structure:

 

RestaurantName  | External_ID  |  API_FUNC_PROCESS

 

  First two fields are textual, but the last one must be of type function which I'm going to use in M Function.Invoke call.

  I can add custom column like this code:

 

= Table.AddColumn(Source, "API_FUNC_PROCESS", each #"Execute External API CALL For Restaurant XXXX", Function.Type)

 

But the code adds the same function for all rows in my custom entered table.

 

The question is: How to manually enter value of type function (or Function.Type) OR how to manually enter, for example, function name and at the next step transform it to Function.Type type?

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Taurus 

Would you like the new added column to be dynamic with different input?

If so, you could try parameter, references are as below:

Use parameter in Power BI

Create dynamic parameter

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

No, it is bad idea, I need to use different functions to process different corporation/departments using api call in Web.Contents, othewise PBI Service will not allow to schedule normally if url is being dymanic.

Taurus
Frequent Visitor

I know how to execute function by its name using Expression.Evaluate:

 

Expression.Evaluate("Function.Invoke(" & func_process_name & ", {""corporation/departments""})", #shared)

 

but I want to implement this in a more elegant way.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors