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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Abhilash_P

Translytical Task Flows in Microsoft Fabric

Introduction

Power BI has traditionally been a powerful tool for analytics and reporting. However, when users need to modify data (write-back) or trigger automated actions like approving a purchase order after reviewing a sales report, these tasks typically require external tools like Power Automate or are left unimplemented due to complexity.

With the preview release of Translytical Task Flow, Power BI now supports both analytical and transactional use cases within the same experience. This opens up new possibilities for interactive, action-driven reporting. Let’s explore how it works and how it enhances the end-user experience.

What is Fabric User Data Function (UDF)?

To understand Translytical Task Flow, we first need to understand Fabric User Data Functions (UDFs), the core engine behind this capability.

Fabric UDFs allows you to write custom business logic in Python (runtime 3.11.9), using public libraries from PyPI. For example, if a sales representative wants to approve a purchase order directly from a Power BI report, the logic behind that action is handled by a UDF.

Best Practices for Writing UDFs

To ensure a smooth user experience, follow these guidelines:

  • Validate inputs: Use fn.UserThrownError() to return user-friendly error messages.
  • Handle exceptions: Wrap database calls in try/except blocks and return clear error messages if something goes wrong (e.g., database offline).
  • Prevent SQL injection: Always sanitize inputs and use parameterized queries.
  • Provide feedback: Return a success message to confirm the operation was completed.

With UDFs, you can now embed transactional logic directly into your Power BI reports - bridging the gap between insight and action.

Designing the Report Page

To support transactional flows, your report needs a simple UI for user inputs and triggers action. Power BI now includes:

  • Text Slicer: For freeform input (e.g., comments, quantities).
  • List Slicer / Button Slicer: For predefined selections (e.g., product categories, approval status).
  • Buttons: To trigger the UDF logic and complete the transaction.

This setup allows users to interact with the report, provide input, and initiate actions - all within the Power BI interface.

 

Example: Enabling Data Write-Back in Power BI with Translytical Task Flow

With Translytical Task Flow, Power BI developers can now implement a wide range of interactive use cases that were previously difficult or required external tools. One of the most requested features, data write-back is now achievable directly within Power BI.

Common Use Cases Enabled by Translytical Task Flow

  • Data Write-Back: Allow users to add, update, or delete records in a Fabric SQL database.
  • Approval Workflows: Enable users to submit requests and allow admins to approve or reject them.
  • Data Annotation: Add, edit, or remove contextual notes or comments on data points.
  • Dynamic Email Notifications: Trigger emails based on user actions or data changes.
  • Custom Automations: Execute business logic or workflows based on report interactions

Implementing Data Write-Back

Here’s how to implement a simple data write-back scenario using Translytical Task Flow:

1. Create a SQL Database in Fabric

Start by creating a SQL database in the Fabric portal where your data will be stored or modified.

2. Create a User Data Function (UDF)

  • Go to your desired workspace in Power BI or Fabric.
  • Select New item → User data functions (preview) under the Develop data group.
    Abhilash_P_0-1761805891225.png
  • Name your function (e.g., sqlwriteback) and click Create.
  • Select the New function and connect it to your SQL database.

3. Add Function Logic

Write your Python logic to handle the write-back operation. You can refer to this example code snippet for guidance.

https://gist.github.com/Sujata994/c354ec8d0821e875e45c86f2bd1d5cc8#data-annotation

4. Test and Publish

  • Test the function to ensure it works as expected.
  • Publish it and grant "Execute Functions" permission to users who need access.

5. Design the Power BI Report

  • Add Text Slicer for freeform input or List Slicer for predefined options.
  • Add a Button to trigger the UDF.

6. Configure the Button

  • Select the button → go to Format → Action → turn Action ON.
  • Choose your UDF and map the required parameters.
  • Under Style, turn Text ON and label the button (e.g., "Submit").
  • Set Apply settings to → Loading.
  • In the Loading state, update the text to something like "Submitting…" and optionally add a spinner icon.

Once configured, clicking the button will trigger the UDF, execute the write-back logic, and return a success or error message to the user - all within the Power BI report.

 

Comments

Appreciate @Abhilash_P for bringing such insightful information 

Thanks for sharing!

Insightifull @Abhilash_P 

Great article @Abhilash_P  Translytical Task Flow makes Power BI more powerful by turning reports into action-based tools

Thanks for sharing!

Great insights, thanks for sharing!

Thank you for sharing