How to query a Fabric / Power BI dataset via the REST API

If you have a dataset (semantic model) in Microsoft Fabric or Power BI, you can query it directly with the ExecuteQueries REST API. The response is JSON, which makes it perfect for automations, integrations, or just wiring analytics into other systems.

In this guide we'll cover the setup in FactBranch. Once you have connected FactBranch to your Power BI account, you can use it to display customer data in other tools like Zendesk, Freshdesk, Dixa, etc.

What you need before you run a query

  1. A dataset in a Power BI or Fabric workspace that supports ExecuteQueries.
  2. The Dataset Execute Queries REST API tenant setting enabled.
  3. Access to the workspace plus dataset read permissions.
  4. The dataset ID (from the dataset settings page in Power BI or Fabric).
  5. A DAX query you want to run.

If your dataset uses RLS, you can also provide an impersonatedUserName in the request body to run the query in the context of a specific user.

The raw REST API call (ExecuteQueries)

First, you need the dataset ID. You can copy it from the dataset settings page in Power BI or Fabric. The API call looks like this:

POST https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/executeQueries
Content-Type: application/json

{
  "queries": [
    {
      "query": "EVALUATE TOPN(10, SUMMARIZECOLUMNS('Sales'[Region], \"TotalSales\", [Total Sales]))"
    }
  ],
  "serializerSettings": {
    "includeNulls": true
  }
}

The response is JSON, containing the result tables and rows. If you have multiple datasets, you call this endpoint once per dataset ID.

Querying a Fabric / Power BI dataset in FactBranch

FactBranch already has the two building blocks you need:

  1. Power BI OAuth (connects your FactBranch account with your Power BI account)
  2. REST API node (runs the ExecuteQueries request and parses the JSON)

Here's how that maps to the Power BI requirements.

Step 1: Connect Power BI

Connect your Power BI account in FactBranch. This is a one‑time setup and lets FactBranch run queries on your datasets without you handling authentication tokens. If you manage multiple tenants, connect the account that owns the dataset.

Step 2: Add a REST API node

Create a REST API node in your FactBranch data pipeline and set:

  • Method: POST
  • URL: https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/executeQueries

Then open the Authentication tab, select Power BI as the data source, and choose the account you connected in step 1. The REST API node will automatically include the necessary headers and authentication settings. If you don't see the account, refresh the page after connecting Power BI.

Step 3: Add the DAX payload

In the body field, paste your DAX query payload:

{
  "queries": [
    {
      "query": "EVALUATE TOPN(10, SUMMARIZECOLUMNS('Sales'[Region], \"TotalSales\", [Total Sales]))"
    }
  ],
  "serializerSettings": {
    "includeNulls": true
  }
}

If you want to filter based on runtime data (like a ticket requester email), you can replace hardcoded values with FactBranch placeholders and the REST API node will substitute them before the request is sent.

Step 4: Run and inspect the JSON output

When you run the node, the REST API node returns a JSON response. FactBranch parses it automatically and exposes fields you can map into UI components, transformations, or downstream integrations. You can also inspect the raw response to validate the DAX output before building the UI.

Summary

The ExecuteQueries REST API is the cleanest way to query Fabric or Power BI datasets with DAX. If you're using FactBranch, the Power BI OAuth connector and REST API node already match the exact requirements: OAuth for tokens, JSON payloads for DAX, and structured results you can plug into your flows.

If you want help wiring this into your specific workflow, start a FactBranch free trial or check the REST API node docs.

Do you want to use your data everywhere?

Sign up for our newsletter to get our freshest insights and product updates.

We care about the protection of your data. Read our Privacy Policy.