TofuPilot's built-in dashboards cover most manufacturing analytics needs. But sometimes you need to combine test data with ERP, MES, or supply chain data in a single report for management. That's when Power BI comes in.
When You Need External BI
TofuPilot handles FPY trends, Cpk, control charts, failure Pareto, and throughput natively. You don't need Power BI for any of those.
External BI tools make sense when you need to correlate test results with data from other systems. Examples: mapping yield by supplier lot (ERP data), comparing test costs to warranty claims (finance data), or building executive summaries that pull from five different sources.
Option 1: CSV Export
The fastest way to get data into Power BI. TofuPilot lets you export test runs and measurements as CSV files directly from the dashboard.
In Power BI Desktop, use Get Data > Text/CSV to import the file. This works well for one-time reports or periodic snapshots.
For recurring reports, save the CSV to a shared folder and configure Power BI to refresh from that location on a schedule.
Option 2: REST API
For automated, always-fresh data, connect Power BI directly to TofuPilot's REST API. This pulls the latest test data every time the report refreshes.
Getting Your API Key
Generate an API key at https://tofupilot.app under your workspace settings. Store it securely. You'll pass it as a header in every request.
API Endpoints
TofuPilot's API provides endpoints for the data you'll need in Power BI:
GET /api/v1/runsreturns test runs with status, timestamps, DUT ID, and procedure infoGET /api/v1/runs/{id}returns a single run with full measurement data
The API returns JSON. Paginate through results using the offset and limit query parameters.
import requests
API_KEY = "your-api-key"
BASE_URL = "https://tofupilot.app/api/v1"
response = requests.get(
f"{BASE_URL}/runs",
headers={"Authorization": f"Bearer {API_KEY}"},
params={"limit": 100, "offset": 0},
)
runs = response.json()Connecting Power BI to the API
In Power BI Desktop, use Get Data > Web and configure the request:
- Select Advanced in the Web dialog
- Set the URL to
https://tofupilot.app/api/v1/runs?limit=100 - Add the header
Authorizationwith valueBearer your-api-key - Click OK to load the JSON response
Power BI's Power Query editor will show the raw JSON. Use To Table > Expand Columns to flatten the nested structure into rows and columns.
Handling Pagination
TofuPilot's API paginates results. To load all runs, create a parameterized query in Power Query that iterates through pages:
let
BaseUrl = "https://tofupilot.app/api/v1/runs",
PageSize = 100,
GetPage = (offset) =>
let
Response = Web.Contents(
BaseUrl,
[
Query = [limit = Text.From(PageSize), offset = Text.From(offset)],
Headers = [Authorization = "Bearer your-api-key"]
]
),
Json = Json.Document(Response)
in
Json,
AllPages = List.Generate(
() => [Page = GetPage(0), Offset = 0],
each List.Count([Page]) > 0,
each [Page = GetPage([Offset] + PageSize), Offset = [Offset] + PageSize],
each [Page]
),
Combined = List.Combine(AllPages),
AsTable = Table.FromList(Combined, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
AsTableThis query fetches pages until it gets an empty result, then combines everything into one table.
Building Useful Reports
Once the data is in Power BI, keep the reports focused on what TofuPilot doesn't already show.
Cross-system correlation. Join test runs with supplier lot data from your ERP. Build a matrix of yield by supplier, by component, by date range. This answers "which supplier's parts cause the most failures?" without manual spreadsheet work.
Executive summaries. Combine yield metrics with production volume and cost data. Show units shipped, test cost per unit, and warranty return rate on a single page.
Multi-site comparison. If you run TofuPilot across multiple factories, Power BI can pull from all instances and normalize the data into a single cross-site view.
Keeping Data Fresh
Set up scheduled refresh in Power BI Service (cloud) to pull new data daily or hourly. For the API connection, store credentials in Power BI's data source settings so refreshes run unattended.
For CSV-based reports, automate the export with a script that runs on a schedule and drops the file where Power BI expects it.