Power BI icon

Power BI

Work with the Power BI API

Overview

The node enables executing DAX queries on Power BI datasets. It connects to a specified Power BI workspace (group) and dataset, runs the provided DAX query, and returns the query results. This is useful for automating data retrieval from Power BI models, integrating Power BI analytics into workflows, or extracting specific insights programmatically.

Practical examples:

  • Running a DAX query to retrieve filtered sales data from a dataset for further processing.
  • Automating report generation by querying datasets and feeding results into other systems.
  • Extracting aggregated metrics or calculated columns dynamically without manual intervention.

Properties

Name Meaning
Authentication Method of authentication to use: OAuth2 or Bearer Token (API key).
Group (Workspace) Name or ID The Power BI workspace (group) where the dataset resides. Leave blank to use "My Workspace". You can select from a list or specify an ID via expression.
Dataset Name or ID The target dataset's ID within the selected workspace. Required. Choose from a list or specify an ID via expression.
DAX Query The DAX query string to execute on the dataset. For example: EVALUATE VALUES(MyMainTable).
Include Nulls Boolean flag indicating whether null (blank) values should be included in the query result set.
Impersonated User Name The User Principal Name (UPN) of a user to impersonate when running the query. Only effective if the dataset model has Row-Level Security (RLS) enabled; otherwise ignored. Example: someuser@mycompany.com.

Output

The node outputs JSON data representing the result set returned by the executed DAX query. The structure typically includes rows and columns corresponding to the query output. If the query returns tabular data, each item in the output array corresponds to a row with key-value pairs for each column.

No binary data output is indicated for this operation.

Dependencies

  • Requires access to the Power BI REST API.
  • Needs appropriate authentication configured in n8n, either OAuth2 credentials or a bearer token (API key).
  • The user must have permissions to access the specified workspace and dataset.
  • If impersonation is used, the dataset must support Row-Level Security (RLS).

Troubleshooting

  • Common issues:

    • Invalid or expired authentication tokens causing authorization failures.
    • Incorrect workspace or dataset IDs leading to resource not found errors.
    • Malformed or invalid DAX queries resulting in query execution errors.
    • Using impersonation without RLS enabled will ignore the impersonation parameter.
  • Error messages and resolutions:

    • "Resource not found" — Verify that the workspace and dataset IDs are correct and accessible.
    • "Unauthorized" or "Access denied" — Check authentication credentials and user permissions.
    • "DAX query syntax error" — Validate the DAX query syntax using Power BI tools before using it here.
    • "Impersonation ignored" — Confirm that the dataset has RLS enabled if impersonation is intended.

Links and References

Discussion