Forum Discussion

Resta_899's avatar
Resta_899
Regular Visitor
1 year ago
Solved

Partial Table Refresh with Instant Visual Update in Power BI using Power Automate

I'm working with a large Power BI dataset and would like to refresh only one specific table on demand. Ideally, I want to have a button inside the Power BI report in the Power BI Service (using Power...
  • Poojara_D12's avatar
    1 year ago

    Hi Resta_899 

    Yes, what you're aiming to do—refreshing a specific table in a Power BI dataset on demand via a button in the Power BI Service—is indeed possible by combining Power Automate, the XMLA endpoint, and a script (usually TMSL or XMLA commands). You're correct that refreshing a dataflow alone won't update report visuals unless the dataset is also refreshed, and the Power BI REST API doesn't support partial refreshes. However, since you're using a Premium workspace, you can take advantage of the XMLA Read/Write endpoint, which allows for table-level refreshes.

    Here's the approach: First, create a Power Automate flow triggered by a Power BI button. In the flow, use an HTTP action or Azure Automation Runbook (or even a PowerShell/Azure Function) that sends a TMSL refresh command via the XMLA endpoint. The TMSL script can be targeted at the specific table you want to refresh, like this:

    {
      "refresh": {
        "type": "full",
        "objects": [
          {
            "database": "YourDatasetName",
            "table": "YourTableName"
          }
        ]
      }
    }
    

    This command can be sent using a PowerShell script via Invoke-ASCmd or Microsoft.AnalysisServices.Tabular libraries, and you can call it using Power Automate's HTTP with Azure AD or Azure Automation. Once the specific table is refreshed, the dataset will reflect the updated visuals immediately on next interaction or automatic re-query by visuals, assuming the model supports query interactivity (e.g., with Import storage mode).

    So yes, it’s a bit of an advanced setup, but it’s absolutely feasible. The key components are:

    1. Premium workspace with XMLA endpoint enabled.

    2. A TMSL/XMLA script for partial refresh.

    3. Power Automate triggering a backend process (PowerShell/Azure Runbook/Azure Function) that executes the script.

    4. A Power BI button connected to the flow.

    This solution avoids full dataset refreshes and gives you near-instant updates for a specific table—ideal for large models with on-demand refresh needs.