Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ Please find all information on how to install and use the kit on https://docs.mi

## Troubleshooting

Common issues and solutions are documented in the [troubleshooting guides](docs/troubleshooting/). For specific issues:

- [Power BI Database Size Showing Incorrect Values](docs/troubleshooting/power-bi-storage-double-reporting.md)
- [Power BI Connection Timeout Errors](docs/troubleshooting/power-bi-connection-timeout.md)

For more troubleshooting resources, see the [complete troubleshooting directory](docs/troubleshooting/).

## Microsoft Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
Expand Down
97 changes: 97 additions & 0 deletions docs/ISSUE-RESPONSE-PowerBI-Storage-Double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Issue Response Template: Power BI Shows Double Database Storage

## Summary
This template provides a standardized response for issues where the Power BI CoE Dashboard reports approximately double the database storage size compared to the Power Platform Admin Center (PPAC).

## When to Use This Template
- User reports database/storage size discrepancies between PPAC and Power BI
- Power BI report shows ~2x the actual storage
- Capacity reporting appears inflated in dashboards

## Root Cause
The CoE Starter Kit syncs two separate storage metrics from the Power Platform Admin API:
1. **Actual Consumption** (`admin_actualconsumption`) - Raw storage amount
2. **Rated Consumption** (`admin_ratedconsumption`) - Normalized/rated value

If the Power BI report incorrectly sums both fields or uses the wrong field, it will display approximately double the actual storage.

---

## Response Template

Thank you for reporting this issue. The discrepancy you're seeing between the Power Platform Admin Center and the Power BI dashboard is typically caused by how the storage metrics are calculated in the Power BI report.

### Root Cause

The CoE Starter Kit's `admin_EnvironmentCapacity` entity stores two different storage consumption values from the Power Platform Admin API:

1. **`admin_actualconsumption`** - The actual storage consumed (this should match PPAC)
2. **`admin_ratedconsumption`** - A rated/normalized consumption value

If your Power BI report is summing both fields together or using the wrong field, it will show approximately double the actual storage size.

### Solution Steps

1. **Open your Power BI report** (Production_CoEDashboard_July2024.pbit or similar)

2. **Check the storage/capacity measures**:
- Navigate to the page showing database storage
- Review the DAX measures or visualizations
- Ensure they use **only** the `admin_actualconsumption` field

3. **Recommended DAX measure**:
```dax
Total Database Storage (GB) =
CALCULATE(
SUM('admin_EnvironmentCapacity'[admin_actualconsumption]) / 1024,
'admin_EnvironmentCapacity'[admin_capacitytype] = "Database",
'admin_EnvironmentCapacity'[admin_environmentdeleted] = false()
)
```

4. **Verify the fix**:
- Refresh your Power BI report
- Compare the values with PPAC
- Values should now match within a small variance

### Additional Resources

We've created a comprehensive troubleshooting guide for this issue:
- [Power BI Storage Double Reporting Guide](./troubleshooting/power-bi-storage-double-reporting.md)

This guide includes:
- Detailed explanation of the two metrics
- Step-by-step fix instructions
- Verification steps
- Related fields reference

### Next Steps

1. Review the troubleshooting guide linked above
2. Apply the recommended fixes to your Power BI report
3. If the issue persists after making these changes, please provide:
- Your CoE Starter Kit version
- A screenshot of the DAX measure currently being used
- An example of the discrepancy (e.g., PPAC shows 260 GB, Power BI shows 520 GB)

### Prevention

When updating or creating custom Power BI reports based on the CoE Starter Kit templates:
- Always use `admin_actualconsumption` for storage comparisons with PPAC
- Add filters for `admin_capacitytype` to avoid mixing different capacity types
- Document any custom measures that use capacity fields

---

## Related Issues
- Reference similar closed issues here when they occur

## Documentation Updates
- [x] Created troubleshooting guide: `docs/troubleshooting/power-bi-storage-double-reporting.md`
- [x] Updated troubleshooting README to reference new guide

## Follow-up Actions
If the user confirms this resolves their issue:
1. Close the issue with reference to the documentation
2. Consider if Power BI templates need updates (if using incorrect measures)
3. Update this template if new patterns emerge
154 changes: 154 additions & 0 deletions docs/VERIFICATION-PowerBI-Storage-Measures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Power BI Template Verification Guide

## Purpose
This guide is for CoE Starter Kit maintainers to verify that the Power BI dashboard templates are using the correct storage/capacity fields.

## Issue Background
The `admin_EnvironmentCapacity` entity contains two consumption fields:
- `admin_actualconsumption` - Should be used for comparing with PPAC
- `admin_ratedconsumption` - Different calculation method, should not be summed with actualconsumption

If Power BI measures incorrectly sum both fields or use the wrong field, users will see approximately double the actual storage size.

## Templates to Verify

The following Power BI templates should be checked:

1. **Production_CoEDashboard_July2024.pbit** - Main production dashboard
2. **PowerPlatformGovernance_CoEDashboard_July2024.pbit** - Governance dashboard
3. **BYODL_CoEDashboard_July2024.pbit** - BYODL variant
4. **Power Platform Administration Planning.pbit** - Admin planning dashboard

## Verification Steps

### 1. Open the Template in Power BI Desktop

1. Launch Power BI Desktop
2. Open the `.pbit` file
3. If prompted, enter connection parameters (or skip if just checking measures)

### 2. Check Capacity/Storage Measures

1. Go to **Model** view or **Report** view
2. Open the **Fields** pane
3. Look for measures related to storage, capacity, or database size
4. Common measure names to check:
- Total Database Storage
- Storage Used
- Capacity Consumed
- Database Size
- Any measure using EnvironmentCapacity table

### 3. Inspect DAX Formulas

For each capacity/storage measure:

1. Right-click the measure → **Edit**
2. Review the DAX formula
3. Check for:
- ✅ CORRECT: Uses only `admin_actualconsumption`
- ❌ INCORRECT: Sums both `admin_actualconsumption` and `admin_ratedconsumption`
- ❌ INCORRECT: Uses only `admin_ratedconsumption`

### 4. Check Visualizations

1. Navigate through each report page
2. For any storage/capacity visualizations:
- Select the visual
- Check the **Fields** pane to see which fields are used
- Verify the **Values** section uses the correct field

### 5. Review Filters

1. Check filters on capacity-related visuals
2. Ensure `admin_capacitytype` is filtered correctly (e.g., "Database" only)
3. Verify `admin_environmentdeleted` is filtered to exclude deleted environments

## Expected Correct DAX Patterns

### Total Database Storage (in GB)
```dax
Total Database Storage (GB) =
CALCULATE(
SUM('admin_EnvironmentCapacity'[admin_actualconsumption]) / 1024,
'admin_EnvironmentCapacity'[admin_capacitytype] = "Database",
'admin_EnvironmentCapacity'[admin_environmentdeleted] = false()
)
```

### Storage by Environment
```dax
Storage by Environment =
CALCULATE(
SUM('admin_EnvironmentCapacity'[admin_actualconsumption]),
'admin_EnvironmentCapacity'[admin_capacitytype] = "Database"
)
```

## Common Issues to Look For

### Issue 1: Summing Both Fields
```dax
❌ INCORRECT:
Total Storage =
SUM('admin_EnvironmentCapacity'[admin_actualconsumption]) +
SUM('admin_EnvironmentCapacity'[admin_ratedconsumption])
```

### Issue 2: Using Wrong Field
```dax
❌ INCORRECT:
Total Storage =
SUM('admin_EnvironmentCapacity'[admin_ratedconsumption])
```

### Issue 3: Missing Filters
```dax
❌ INCORRECT (no capacity type filter):
Total Storage =
SUM('admin_EnvironmentCapacity'[admin_actualconsumption])
// This sums ALL capacity types, not just Database
```

## Testing

After making any corrections:

1. **Connect to test data**:
- Use a test CoE environment with known storage values
- Compare Power BI results with PPAC

2. **Spot check specific environments**:
- Filter to a single environment
- Verify the storage matches PPAC exactly (or very close)

3. **Check totals**:
- Compare tenant-wide totals with PPAC
- Values should match within ~1-2% (due to timing differences)

## Fixing Issues

If you find incorrect measures:

1. **Update the DAX formula** using the correct patterns above
2. **Test thoroughly** with real data
3. **Update all affected templates** (Production, Governance, BYODL, etc.)
4. **Document the change** in release notes
5. **Update version numbers** in template metadata

## Automated Verification (Future)

Consider creating a script to:
- Extract DataModelSchema from .pbit files
- Parse for capacity-related measures
- Flag measures using both consumption fields
- Generate a report of findings

## Related Documentation

- [Power BI Storage Double Reporting Troubleshooting Guide](./troubleshooting/power-bi-storage-double-reporting.md)
- [Issue Response Template](./ISSUE-RESPONSE-PowerBI-Storage-Double.md)

## Questions?

If you need help verifying or fixing templates, reach out to the CoE Starter Kit maintainer team.
3 changes: 2 additions & 1 deletion docs/troubleshooting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ This directory contains troubleshooting guides for common issues encountered whe

## Available Guides

### Power BI Connection Issues
### Power BI Dashboard Issues

- **[Power BI Connection Timeout Error](power-bi-connection-timeout.md)** - Troubleshoot timeout and connection errors when connecting Power BI dashboards to Dataverse, specifically for the Admin Planning Component dashboard.
- **[Database Size Showing Incorrect in Power BI](power-bi-storage-double-reporting.md)** - Resolve issues where the Power BI dashboard shows approximately double the database storage size compared to Power Platform Admin Center.

## General Troubleshooting Resources

Expand Down
105 changes: 105 additions & 0 deletions docs/troubleshooting/power-bi-storage-double-reporting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Power BI Dashboard - Database/Storage Size Showing Incorrect Values

## Issue Description

The Power BI CoE Dashboard may show database storage sizes that are approximately double the values displayed in the Power Platform Admin Center (PPAC). For example:
- PPAC shows ~260 GB
- Power BI report shows ~520 GB (roughly double)

## Root Cause

The issue occurs because the CoE Starter Kit stores **two different storage consumption metrics** from the Power Platform Admin API:

1. **Actual Consumption** (`admin_actualconsumption`) - The actual storage consumed
2. **Rated Consumption** (`admin_ratedconsumption`) - The rated or normalized storage value

Both metrics are synced from the Power Platform Admin API and stored in the `admin_EnvironmentCapacity` table. If the Power BI report is configured to sum both fields or use the wrong field for calculations, it will display approximately double the actual storage size.

## Understanding the Two Metrics

According to Microsoft's Power Platform capacity documentation:

- **Actual Consumption**: The raw storage amount used by the environment
- **Rated Consumption**: A normalized or "rated" value that may include additional factors for capacity calculations

For accurate comparison with PPAC, you should use the **Actual Consumption** field.

## Solution

### Option 1: Verify and Fix Power BI Report Measures

1. Open your Power BI report (`.pbit` or `.pbix` file)
2. Navigate to the report page showing storage/capacity metrics
3. Check the DAX measures or visuals that display database size
4. Ensure they are using **only** the `admin_actualconsumption` field, not:
- Both `admin_actualconsumption` AND `admin_ratedconsumption` (summed together)
- Only `admin_ratedconsumption`
- A calculated field that combines both

### Option 2: Filter by Capacity Type

The `admin_EnvironmentCapacity` table stores multiple capacity types. Ensure your Power BI report filters correctly:

1. Check for the `admin_capacitytype` field in your queries
2. Filter to show only database storage types (typically "Database")
3. Avoid accidentally duplicating records by joining without proper filtering

### Recommended DAX Measure

Create or update your storage measure to use only actual consumption:

```dax
Total Database Storage (GB) =
CALCULATE(
SUM('admin_EnvironmentCapacity'[admin_actualconsumption]) / 1024,
'admin_EnvironmentCapacity'[admin_capacitytype] = "Database",
'admin_EnvironmentCapacity'[admin_environmentdeleted] = false()
)
```

## Verification Steps

After making changes to your Power BI report:

1. **Compare with PPAC**:
- Go to Power Platform Admin Center
- Navigate to Resources > Capacity
- Compare the total database storage shown with your Power BI report
- Values should match within a small variance (due to timing differences)

2. **Check the Data Source**:
- Open Power Query Editor in Power BI Desktop
- Review the `admin_EnvironmentCapacity` query
- Verify you're selecting the correct field: `admin_actualconsumption`

3. **Test with Known Values**:
- Pick a specific environment where you know the exact storage size from PPAC
- Filter your Power BI report to that environment
- Verify the values match

## Additional Resources

- [Power Platform Capacity Documentation](https://learn.microsoft.com/power-platform/admin/capacity-storage)
- [CoE Starter Kit Power BI Setup](https://learn.microsoft.com/power-platform/guidance/coe/setup-powerbi)
- [Understanding Dataverse Storage Capacity](https://learn.microsoft.com/power-platform/admin/capacity-storage)

## Related Entities and Fields

The following fields are available in the `admin_EnvironmentCapacity` entity:

| Field Name | Description | Use in Reports |
|------------|-------------|----------------|
| `admin_actualconsumption` | Actual storage consumed | ✅ Use this for comparing with PPAC |
| `admin_ratedconsumption` | Rated/normalized consumption | ⚠️ Different calculation method |
| `admin_approvedcapacity` | Approved capacity limit | Use for capacity planning |
| `admin_capacitytype` | Type of capacity (Database, File, Log) | Use for filtering |
| `admin_capacityunit` | Unit of measurement (typically MB) | Use for conversions |

## Need Help?

If you continue to experience discrepancies after following these steps:

1. Verify your CoE Starter Kit is up to date with the latest version
2. Run a full inventory sync to refresh capacity data
3. Check the CoE Starter Kit GitHub repository for related issues: [aka.ms/coe-starter-kit-issues](https://aka.ms/coe-starter-kit-issues)
4. Review the [Power BI Connection Timeout troubleshooting guide](./power-bi-connection-timeout.md) for connection issues