Power BI
Power BI is the most common way Ditio customers build their own dashboards — labor hours per project, machine utilization, absence overviews. Ditio provides a starter template (.pbit) that wires up authentication and the most-used data sets, so you can go from credentials to a working report without writing queries from scratch.
Prerequisites
Section titled “Prerequisites”- API credentials — a
client_idandclient_secretcreated from Ditio Web (Authentication) - An access token — either a long-lived token generated in the Ditio Web UI or one obtained via the client-credentials flow
- Power BI Desktop installed
Starter template
Section titled “Starter template”Download the Power BI template (.pbit) from Ditio and open it in Power BI Desktop.
Setting up the template
Section titled “Setting up the template”When you open the template, you’ll be prompted for these values:
| Parameter | Description | Example |
|---|---|---|
| FromDate | Start date (ISO format, minimum yyyy-MM-dd) | 2026-01-01 |
| ToDate | End date (ISO format) | 2026-12-31 |
| ProjectCompanyId | Optional — only needed if your organization has multiple companies in Ditio. Leave blank if unsure. | (blank) |
Date format examples:
- Minimum:
2026-01-01 - Detailed:
2026-01-01T12:30:00.000Z(UTC)
Unless you are targeting the test environment, you don’t need to change any URLs.
Background refresh
Section titled “Background refresh”You’ll find the setting under the data source’s credential settings when configuring scheduled refresh.
Token lifetime and refresh
Section titled “Token lifetime and refresh”The template authenticates with a bearer token. Two practical options:
- Long-lived token from the Ditio Web UI — simplest for scheduled refresh; an administrator generates it on the integration page (these are audited)
- Short-lived token via the client-credentials flow — more secure, but you need somewhere to run the token request and update the parameter
Custom queries
Section titled “Custom queries”The template covers the common data sets. If you need a specific query shape — or a chunk-loaded query for a large date range — see Power Query Examples. For large exports and data warehouses, consider the paginated Data Extraction API instead of loading everything through Power Query.
Common issues
Section titled “Common issues”| Issue | Cause | Fix |
|---|---|---|
| ”Test connection failed” in the Power BI service | Bearer-token sources fail Power BI’s test-connection step | Check Skip test connection — the refresh itself works |
401 after some time | Token expired | Generate a new token, or switch to a long-lived UI token for scheduled refresh |
| Timeouts on big date ranges | Too much data in one request | Use the chunk-loaded queries in Power Query Examples, or narrow FromDate/ToDate |
| Empty tables | Wrong environment or wrong company | Verify the URL parameter matches the environment your credentials were created in |
Related
Section titled “Related”- Power Query Examples — maintained query snippets, including chunk-loaded variants
- Authentication — creating credentials and tokens
- Export Time Data — the API-first alternative for data warehouses