A Windows system tray application for monitoring Power BI semantic model refresh status, capacity utilization, and gateway health - all at a glance.
The tray icon displays real-time capacity metrics using 3 dynamic bars:
| Bar | Represents | Color |
|---|---|---|
| Left | Background utilization % | Blue |
| Middle | Total utilization % | Green/Orange/Red (health) |
| Right | Interactive utilization % | Teal |
The middle bar changes color based on capacity health:
- π’ Green: Normal (<80%)
- π Orange: High (80-99%)
- π΄ Red: Critical (β₯100%, throttling)
- β Real-time refresh status tracking
- π Detailed refresh history with table-level breakdown
- β±οΈ Countdown to next scheduled refresh
- π Windows notifications on refresh completion/failure
- π Live capacity utilization monitoring
- π΅ Background vs Interactive utilization breakdown
- β‘ Throttling status alerts
- π Stacked progress bar visualization
- π Gateway online/offline status
β οΈ Alerts for offline or degraded gateways- π Multi-gateway support with individual status
- π Azure Data Factory pipeline schedule tracking
- β° Next run time display for each pipeline
- π Full/Partial refresh type indicators
- Download or clone this repository
- Double-click
setup.bat- this will:- Create a Python virtual environment
- Install all dependencies
- Optionally add to Windows startup
- Launch the application
# Create virtual environment
python -m venv .venv
.\.venv\Scripts\Activate.ps1
# Install dependencies
pip install -r requirements.txt
# Run the application
python -m pbi_tray- A browser window opens for Microsoft sign-in
- Sign in with your Power BI account
- Credentials are cached for future sessions
Right-click the tray icon β Settings to configure:
| Setting | Description |
|---|---|
| Workspace ID | Your Power BI workspace GUID |
| Dataset ID | Your semantic model GUID |
| Timezone | Display timezone for timestamps |
| Capacity Workspace | Workspace for capacity metrics (optional) |
| Pipelines | Azure Data Factory pipeline configuration |
Copy settings.example.json to settings.json and configure your IDs:
{
"workspace_id": "your-workspace-guid",
"dataset_id": "your-dataset-guid",
"refresh_interval": 300,
"timezone": "UTC",
"capacity_metrics_workspace": "Microsoft Fabric Capacity Metrics - YourCapacity"
}- Open Power BI Service
- Navigate to your workspace β semantic model
- Look at the URL:
https://app.powerbi.com/groups/{WORKSPACE_ID}/datasets/{DATASET_ID}/details
Right-click the tray icon:
| Section | Items |
|---|---|
| Status | Current status, last refresh time, duration |
| Recent History | Last 5 refreshes with expandable details |
| Capacity | Utilization %, BG/Interactive breakdown |
| Actions | Trigger Refresh, Cancel Refresh, Check Status |
| Account | Sign In, Sign Out |
| Settings | Timezone, Configuration |
Double-click the tray icon to open the full details window:
- Status Overview: Last refresh with countdown to next
- Gateways: Health status of all connected gateways
- Pipelines: Configured refresh pipelines with schedules
- Capacity: Detailed utilization with stacked bar chart
- History: Scrollable list with expandable table-level details
To enable capacity monitoring, you need access to a workspace with the Microsoft Fabric Capacity Metrics app installed.
- Install the Capacity Metrics app
- Copy the workspace ID where it's installed
- Add to settings as "Capacity Workspace"
Configure Azure Data Factory pipelines in settings:
{
"pipelines": {
"pipeline-guid-1": {
"name": "Full Daily Refresh",
"type": "full",
"cron": "0 6 * * *"
},
"pipeline-guid-2": {
"name": "Intra-Daily Refresh",
"type": "partial",
"cron": "0 */2 * * *"
}
}
}PowerBI_Tray/
βββ pbi_tray/ # Main application package
β βββ api/ # Power BI API clients
β βββ ui/ # UI components
β βββ __init__.py
β βββ __main__.py # Entry point
β βββ auth.py # Authentication
β βββ config.py # Configuration
β βββ tray.py # System tray
βββ assets/ # Icons and images
β βββ icon.ico
β βββ PBI_mini.png
β βββ settings.png
β βββ ...
βββ scripts/ # Utility scripts
β βββ add_to_startup.bat
β βββ remove_from_startup.bat
β βββ pbi_tray_silent.vbs
βββ setup.bat # Automated setup (double-click)
βββ setup.ps1 # PowerShell setup script
βββ settings.json # User configuration (gitignored)
βββ settings.example.json # Example configuration
βββ requirements.txt # Python dependencies
βββ README.md
Uses MSAL (Microsoft Authentication Library):
- First run: Browser-based interactive sign-in
- Subsequent runs: Automatic token refresh
- Token cache: Securely stored in
.token_cache.json
To force re-authentication: Account β Sign Out
- OS: Windows 10/11
- Python: 3.9+
- License: Power BI Pro or Premium Per User
- Permissions: Read access to workspace/dataset
- Check system tray overflow (arrow near clock)
- Restart the application
- Use Account β Sign Out, then sign in again
- Delete
.token_cache.jsonand restart
- Ensure Capacity Metrics app is installed
- Verify workspace ID is correct
- Check you have access to the capacity
- Dataset uses only cloud datasources
- No on-premises gateway configured
MIT License - See LICENSE file for details.
Contributions welcome! Please open an issue or pull request