Nodes

Power BI

Prerequisites

In this article you'll learn:

The Power BI node runs dataset queries via Power BI's ExecuteQueries API. It is designed for querying semantic models (datasets) with DAX and returning structured rows you can use in downstream nodes.

Like most nodes, the UI has two parts:

  • The left panel for configuration (query + authentication)
  • The right panel for input/output preview and test runs

What the Power BI node does

The node sends a request to:

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

and submits your query as:

{
  "queries": [
    {
      "query": "<your query>"
    }
  ],
  "serializerSettings": {
    "includeNulls": true
  }
}

The response is transformed into FactBranch's table_map format (same shape as SQL nodes) so downstream logic can handle it consistently.

Power BI OAuth authentication setup

Open the Authentication tab and select an oauth_powerbi data source. If you do not have one yet, create it first from Data sources.

If the access token is expired, the node can automatically refresh and retry when Power BI responds with an OAuth-expired signal (401 or 403 TokenExpired).

Power BI dataset ID requirements

In the Query tab, set the Dataset ID field.

Requirements:

  • It must resolve to a UUID in canonical format: 12345678-1234-1234-1234-123456789abc
  • You can enter a static ID, or a dynamic placeholder like $data.dataset_id

If the value is missing or not a valid UUID, the node returns an error before calling Power BI.

Writing DAX queries in the Power BI node

Use the editor to write your DAX query. The editor uses SQL highlighting, but the query language for this node is DAX.

Example:

EVALUATE
FILTER(
  Customers,
  Customers[Email] = $data.email
)

Using dynamic placeholders in Power BI queries

You can use placeholders from incoming flow data just like in other nodes:

  • $data... for current payload data
  • $nodes... for previous node output in test input context
  • $trigger... for trigger payload in test input context

Nested paths and array indexing are supported (for example $data.items[0].email).

If you need a literal dollar sign, escape it as $$.

How FactBranch inserts placeholder values safely

Placeholders are substituted on the server and converted into DAX-safe literals:

  • null -> BLANK()
  • true / false -> TRUE() / FALSE()
  • numbers -> numeric literal (no quotes)
  • strings -> double-quoted DAX string with escaped quotes
  • objects/lists -> JSON string literal

This allows using runtime values without directly concatenating raw text into query syntax.

Only use trusted placeholder sources

Even with safe server-side placeholder insertion, you should only use placeholder values from trusted sources. Avoid passing raw end-user input directly into query placeholders unless you have validated and constrained it for your use case.

Previewing and testing Power BI queries

Use the right panel's Run button to execute a test request.

The test input comes from:

  1. Trigger sample data, and/or
  2. Output from previous nodes in your flow

You can edit input values in preview before running.

The test run calls the real Power BI API, so it validates the actual query and auth state.

Power BI node output format (table_map)

The Power BI node returns the same table_map structure as SQL nodes:

{
  "fieldnames": ["Customers[Email]", "[TotalOrders]"],
  "rows": [
    {
      "Customers[Email]": "alice@example.com",
      "[TotalOrders]": 3
    }
  ]
}

Notes:

  • fieldnames contains the discovered column names
  • rows contains row objects
  • Missing fields in a row are returned as null for consistency

This makes downstream usage predictable in template nodes and variable paths like $data.rows[0]["Customers[Email]"].

Power BI node error handling

The node returns a clear error in common cases:

  • Missing dataset ID
  • Invalid dataset ID format
  • Empty query
  • Network timeout / network request error
  • Power BI API error response (uses API message when available)

For non-200 API responses, the node tries to surface Power BI's error.message or error.code in the output.

Power BI node troubleshooting

1. Fix TokenExpired / Access token has expired

Reconnect your Power BI OAuth source if needed. The node retries automatically on token-expired responses, but persistent failures usually indicate revoked or invalid credentials.

2. Fix Please specify a valid Power BI dataset ID (UUID).

Ensure the final resolved dataset ID is a canonical UUID string. If you use placeholders, check the incoming value in preview input data.

3. Query runs but returns no rows in Power BI

Validate:

  • dataset ID is correct
  • query targets the expected tables/measures
  • runtime filter values from placeholders are what you expect

4. Fix Power BI access denied / permissions errors

Verify the connected Power BI account has access to the workspace and dataset.

Next steps after configuring the Power BI node

Once your query works, use: