# Load your app data into Power BI

> Pull a table's records into Microsoft Power BI with a Blank Query that calls the Tadabase REST API and pages through every record.

Source: https://tadabase.com/docs/integrations/viewing-data-in-microsoft-bi  
Status: Verified Nov 17, 2026. Checked against the current product

Microsoft Power BI can load a table's records straight from the Tadabase REST API. You paste a short query into Power BI, and it reads the records page by page into a table you can report on.

## Before you start

- An API key for your app with **Allow Reads** turned on. Copy its **App ID**, **API Key** and **API Secret**. See [Getting API keys](https://tadabase.com/docs/developers/getting-api-keys).
- The ID of the table you want to load. You can list your tables and their IDs with the API's `GET /api/v1/data-tables` call; see the [REST API overview](https://tadabase.com/docs/developers/rest-api-overview).
- Power BI Desktop, installed from Microsoft.

## Add the query in Power BI

1. **Start a blank query** In Power BI Desktop, choose **Get Data** > **Blank Query**. The Power Query Editor opens.
2. **Open the Advanced Editor** Right-click the new query and choose **Advanced Editor**.
3. **Paste the query** Replace everything in the editor with the query below, and put your table ID, App ID, API Key and API Secret in place of the four `REPLACE_WITH_...` values.

```text
let
    apiUrl = "https://api.tadabase.io/api/v1/data-tables/REPLACE_WITH_TABLE_ID/records",
    perPage = 100,
    Headers = [
        #"X-Tadabase-App-Id" = "REPLACE_WITH_APP_ID",
        #"X-Tadabase-App-Key" = "REPLACE_WITH_API_KEY",
        #"X-Tadabase-App-Secret" = "REPLACE_WITH_API_SECRET"
    ],

    GetPage = (page as number) =>
        let
            Url = apiUrl & "?page=" & Text.From(page) & "&limit=" & Text.From(perPage),
            Json = Json.Document(Web.Contents(Url, [Headers = Headers]))
        in
            Json,

    GetRecords = (page as number, collected as list) =>
        let
            Data = Function.InvokeAfter(() => GetPage(page), #duration(0, 0, 0, 2)),
            AllItems = List.Combine({collected, Data[items]}),
            Result =
                if page >= Data[total_pages]
                then Table.FromRecords(AllItems)
                else @GetRecords(page + 1, AllItems)
        in
            Result,

    Records = GetRecords(1, {})
in
    Records
```

1. **Run it** Click **Done**. Power BI asks how to connect to the URL the first time: choose anonymous access, because the credentials travel in the query's headers.
2. **Rename the columns** Each field arrives under its field slug, such as `field_58`. Rename the columns to names you recognise.
3. **Load the data** Click **Close & Apply**. The table's records are now available for your reports, and **Refresh** in Power BI reloads them.

## How the query pages through records

The API returns records one page at a time. Each response has the records in `items`, plus `total_items`, `total_pages` and `current_page`. The query asks for page 1, then keeps asking for the next page until it reaches `total_pages`, and joins the pages into one table.

- `limit` is the number of records per page. The API caps it (at 100 by default), so asking for more does not return more per page; keep `perPage` at 100.
- The query waits two seconds between pages so a large table does not run into your plan's [API rate limits](https://tadabase.com/docs/developers/rate-limiting). Each page counts as one API call.

> **Warning:** Tadabase support can help with the API itself, but not with building Power BI data models or editing Power Query scripts.

## Which records Power BI sees

The query signs in with the API key only, not as an app user, so it reads every record in the table. [Record-level security](https://tadabase.com/docs/users-security/record-level-security) rules, which filter records per user, do not apply to these calls. Anyone who can open your Power BI file sees all of the table's data, so share it with care, and turn off or delete the API key if the file is no longer needed.
