Forum Discussion

4 Replies

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Icon for Community Champion rankCommunity Champion

    Hi paulos​,

    The replies above are pointing in the right direction. One thing I would clarify from Microsoft’s current documentation is the exact sequence in which the parameters appear.

    The parameter mappings do not show just because the button Action is set to Data function.

    You first need to select the actual published User Data Function:

    Button
    → Action = Data function
    → select the fx button next to Data function
    → OneLake catalog opens
    → select the published function

    After that, Power BI displays the Workspace, Function set and function name, and then the parameters from that function appear for mapping.

    Microsoft documents that flow in the Data function button guidance.

    Also check that the User Data Function returns a string. Microsoft specifically requires a function used by a Power BI data-function button to return a str value.

    So I would test with the smallest possible function first, for example:

    import fabric.functions as fn
    
    udf = fn.UserDataFunctions()
    
    @udf.function()
    def hello(name: str, amount: int) -> str:
    return f"Received {name}, {amount}"

    Publish that function, select it from the button’s OneLake catalog, and confirm whether name and amount then appear.

    If they do, the button configuration is fine and the issue is inside the original function definition.

    One other current limitation to be aware of: you can configure the button in Power BI Desktop, but Microsoft notes that the action itself cannot be triggered until the report is published to the Service.

    There is also now a dedicated Data function button option in the newer translytical task-flow tutorial, so I would use that rather than relying only on a generic blank button where possible.

    Microsoft’s current end-to-end tutorial walks through the same sequence.

    So my troubleshooting order would be:

    published function
    → return type is str
    → select function from OneLake catalog
    → confirm parameters appear
    → map parameters
    → publish report
    → test execution in the Service

    If the parameters still do not appear after a valid published function is selected, then I would treat that as unexpected behavior rather than just a missing configuration step.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

  • v-achippa's avatar
    v-achippa
    Icon for Community Support rankCommunity Support

    Hi paulos​,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you rajendraongole1​ and jubinsoni​ for the prompt response.

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

    Thanks and regards,
    Anjan Kumar Chippa

  • jubinsoni's avatar
    jubinsoni
    Icon for Skilled Sharer rankSkilled Sharer

    Hi paulos​,

    When the parameter list does not appear after choosing the function, it is almost always one of the prerequisites rather than the button itself. The checklist I go through:

    1. Desktop preview feature on
       File > Options > Preview features > "Translytical task flows" (restart Desktop)
    2. Tenant settings (Fabric admin portal)
       "Users can create Fabric items" + user data functions enabled for you
    3. The user data function is PUBLISHED, not just saved
       (open the function item > Publish, wait for it to complete)
    4. You can see that workspace and function with the account signed in to Desktop
    5. Button > Action > Type = Data function
       -> Workspace -> Function set -> Data function
       -> parameters should now list; map each with fx (measure / slicer field)
    6. Parameter types are supported ones (str, int, float, bool, datetime)
       and the function signature has no errors

    A minimal function to test the wiring end to end (publish this, then pick it in the button):

    import fabric.functions as fn
    
    udf = fn.UserDataFunctions()
    
    @udf.function()
    def hello_param(name: str, amount: int) -> str:
        return f"Received {name} with {amount}"

    If this test function shows its two parameters in the button but your real one does not, the issue is in the real function (usually an unsupported type, a default value pattern, or it was not republished after editing). Also note the report needs to be published to the Service to actually run the action; Desktop is only for wiring it up.

    So my overall approach would be:

    Enable the preview feature + tenant settings
    -> Publish the user data function
    -> Test with a 2-parameter hello function
    -> Map parameters with fx, publish report, test in the Service

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

  • Hi paulos​ -From your screenshot, no function is selected yet. Once one is, you’ll see Workspace / Function set / Function name under “Data function,” and the parameter fields appear below that.   Click the fx icon, pick your function in the OneLake catalog. If it isn’t listed, check:

    The function returns a string (-> str). Non-string returns are hidden from the button.                       The User Data Functions item is published and you have access to its workspace.                      Desktop is signed in to the same tenant.                                                                                             Then map each parameter (e.g., a SELECTEDVALUE(Table[Id]) measure for the Id). Note the action only runs after publishing to the Service.

    Ref: Create data function buttons - Power BI | Microsoft Learn

     Hope this helps.