Composite Models: Scale to Billions of Rows
Power BI
Power BI14 min read

Composite Models: Scale to Billions of Rows

Build high-performance Power BI composite models with aggregation tables for sub-second queries on billion-row enterprise datasets at scale.

By Errin O'Connor, Chief AI Architect

Power BI composite models with aggregations enable enterprise organizations to query billions of rows with sub-second response times by intelligently routing queries between pre-computed Import-mode aggregation tables and DirectQuery detail tables. This architecture pattern is the standard approach for large-scale analytical workloads where full data import is impractical due to volume, and pure DirectQuery is unacceptable due to latency. Our Power BI architecture team implements aggregation patterns for organizations processing 10 billion+ row fact tables across financial services, healthcare, retail, and manufacturing.

This guide covers aggregation design methodology, multi-level aggregation hierarchies, query routing internals, performance tuning, and production monitoring for composite models at enterprise scale.

How Aggregations Work in Power BI

Aggregations in Power BI work through a query routing mechanism. When a user interacts with a report, the Power BI engine analyzes the query and determines whether a pre-computed aggregation table can answer it. If yes, the query hits the fast Import-mode table. If not, the query falls through to the DirectQuery detail table.

Query routing decision flow:

``` User clicks slicer or visual -> Power BI engine parses DAX query -> Check: Do aggregation mappings cover all required columns? -> YES: Route to Import aggregation table (sub-second) -> NO: Route to DirectQuery detail table (2-10 seconds) -> Return results to visual ```

This routing is completely transparent to users and report developers. No DAX changes are required. The engine handles routing automatically based on aggregation mappings configured in the model.

Aggregation Design Methodology

Designing effective aggregations requires understanding your query patterns, data distribution, and user behavior.

Step 1: Analyze Query Patterns

Before creating aggregation tables, profile which queries users actually run. This prevents building aggregations nobody uses.

Tools for query analysis:

ToolWhat It RevealsHow to Access
Performance AnalyzerPer-visual DAX query and execution timePower BI Desktop, Performance Analyzer pane
DAX Studio query logDetailed engine query plansConnect DAX Studio to Power BI Desktop
Fabric Capacity MetricsTop queries by CPU consumptionFabric Capacity Metrics app
Log AnalyticsHistorical query patterns across all usersAzure Log Analytics workspace
VertiPaq AnalyzerModel statistics and memory usageDAX Studio VertiPaq Analyzer tab

What to look for: - Most common grouping dimensions (Date grain, Product category, Region) - Most common aggregation functions (SUM, COUNT, AVERAGE, DISTINCTCOUNT) - Queries that hit DirectQuery and take longer than 3 seconds - Percentage of queries that could be answered by pre-aggregated data

Step 2: Define Aggregation Grain

The grain of your aggregation table determines which queries it can answer.

Grain selection examples:

Detail Table GrainAggregation GrainSize ReductionQueries Covered
Individual transactionsDaily by Product by Region100x-1000xDaily and above time analysis
Hourly sensor readingsDaily by Equipment24x minimumDaily trends, weekly/monthly rollups
Line-item salesMonthly by Category by Store500x-5000xMonthly executive dashboards
Click-stream eventsHourly by Page by Campaign50x-100xCampaign performance analysis

Rule of thumb: Choose the finest grain that still achieves a 10x+ size reduction. Finer grain = more queries covered. Coarser grain = smaller table, faster queries, but more fallthrough to DirectQuery.

Step 3: Build the Aggregation Table

Create the aggregation table in your data source (data warehouse, lakehouse) or as a Power Query computed table.

Aggregation table design principles: - Include all dimension keys needed for common queries - Pre-compute SUM, COUNT, MIN, MAX for each measure - Include DISTINCTCOUNT only when specifically needed (most expensive aggregation) - Add a row count column for COUNT aggregation support - Maintain the aggregation table through ETL alongside your detail table

Example aggregation table DDL:

```sql CREATE TABLE Agg_Sales_Daily AS SELECT DateKey, ProductCategoryKey, RegionKey, CustomerSegmentKey, SUM(Revenue) as TotalRevenue, SUM(Cost) as TotalCost, SUM(Quantity) as TotalQuantity, COUNT(*) as TransactionCount, COUNT(DISTINCT CustomerKey) as UniqueCustomers FROM Sales_Detail GROUP BY DateKey, ProductCategoryKey, RegionKey, CustomerSegmentKey ```

Step 4: Configure Aggregation Mappings

In Power BI Desktop, configure the aggregation table to map to the detail table.

Mapping configuration:

Aggregation ColumnFunctionDetail Column
TotalRevenueSumSales_Detail[Revenue]
TotalCostSumSales_Detail[Cost]
TotalQuantitySumSales_Detail[Quantity]
TransactionCountCountSales_Detail[TransactionID]
UniqueCustomersDistinctCountSales_Detail[CustomerKey]
DateKeyGroupBySales_Detail[DateKey]
ProductCategoryKeyGroupBySales_Detail[ProductCategoryKey]
RegionKeyGroupBySales_Detail[RegionKey]
CustomerSegmentKeyGroupBySales_Detail[CustomerSegmentKey]

After configuring mappings: - Set the aggregation table storage mode to Import - Set the detail table storage mode to DirectQuery - Set all shared dimension tables to Dual mode - Hide the aggregation table from report view (users should never interact with it directly)

Multi-Level Aggregation Hierarchies

For very large datasets, a single aggregation level may not be sufficient. Multi-level hierarchies provide additional acceleration.

Three-level aggregation example:

``` Level 1: Agg_Sales_Yearly (Import) - ~10K rows Covers: Annual executive summaries, YoY comparisons | Level 2: Agg_Sales_Monthly (Import) - ~500K rows Covers: Monthly trends, quarterly analysis, MTD calculations | Level 3: Agg_Sales_Daily (Import) - ~10M rows Covers: Daily analysis, weekly rollups, WoW comparisons | Detail: Sales_Detail (DirectQuery) - ~5B rows Covers: Transaction-level drilldown, ad-hoc detail queries ```

How multi-level routing works: The engine checks from the coarsest aggregation first. If Level 1 can answer the query, it stops there. Otherwise, it tries Level 2, then Level 3, and finally falls through to the detail table. Each level reduces the probability of hitting DirectQuery.

Aggregation hit rate targets by level:

LevelTarget Hit RateCumulative Coverage
Level 1 (Yearly)10-15% of queries10-15%
Level 2 (Monthly)30-40% of queries40-55%
Level 3 (Daily)30-35% of queries70-90%
Detail (DirectQuery)10-30% of queries100%

Performance Monitoring and Tuning

Measuring Aggregation Effectiveness

DAX Studio aggregation analysis:

Connect DAX Studio to your Power BI model and execute queries while monitoring the Server Timings pane. Look for:

  • VertiPaq SE queries only = Aggregation hit (Import mode served the query)
  • DirectQuery events present = Aggregation miss (query fell through to source)

Systematic aggregation coverage analysis:

  1. Extract all DAX queries from Performance Analyzer for each report page
  2. Run each query in DAX Studio and check for DirectQuery events
  3. Calculate aggregation hit rate: (queries with no DQ events) / (total queries)
  4. For queries with DQ events, analyze which columns caused the miss
  5. Adjust aggregation grain or add columns to cover more queries

Common Aggregation Miss Causes

CauseSolution
Filter on column not in aggregationAdd the column to aggregation GroupBy
DISTINCTCOUNT not mappedAdd DISTINCTCOUNT column to aggregation table
DAX measure uses CALCULATE with complex filterSimplify measure or accept DQ fallthrough
Date grain too coarse for queryAdd finer-grain aggregation level
Cross-table filter propagationEnsure dimension tables are Dual mode
Field parameters in useField parameters may prevent aggregation matching

DirectQuery Source Optimization

When queries fall through to DirectQuery, source database performance becomes critical.

Source-side optimizations:

  • Create covering indexes for common query patterns
  • Maintain up-to-date statistics on aggregated columns
  • Implement materialized views at the database level as an additional caching layer
  • Use columnstore indexes for analytical query patterns
  • Monitor and optimize the queries Power BI generates (capture with database profiling tools)

**For detailed DirectQuery optimization, see our DirectQuery optimization guide.**

Aggregation Patterns for Specific Industries

Financial Services

DataDetail GrainAggregation GrainKey Metrics
Trade dataIndividual tradesDaily by instrument by deskVolume, PnL, risk exposure
Transaction dataIndividual transactionsDaily by account type by branchTransaction count, amounts, fees
Risk metricsHourly calculationsDaily by portfolio by risk factorVaR, stress test results

Healthcare

DataDetail GrainAggregation GrainKey Metrics
Patient encountersIndividual encountersMonthly by department by diagnosisPatient volume, LOS, readmission rates
Claims dataIndividual claimsMonthly by payer by procedureClaim amounts, denial rates
Clinical measuresIndividual measurementsWeekly by unit by measure typeQuality scores, compliance rates

Retail

DataDetail GrainAggregation GrainKey Metrics
POS transactionsLine itemsDaily by store by categoryRevenue, units, margin
InventoryDaily snapshotsWeekly by warehouse by SKUStock levels, turnover rate
E-commerceClick eventsHourly by page by campaignConversion rate, cart abandonment

Integration with Other Patterns

Aggregations work best when combined with other enterprise patterns:

  • **Incremental refresh** — Apply incremental refresh to both aggregation and detail tables for efficient data loading
  • **Composite models** — Aggregations are a core composite model pattern; see our composite models guide for broader architecture context
  • **Star schema design** — Aggregations work most effectively on properly designed star schemas where dimension relationships are clean
  • **DAX optimization** — Ensure DAX measures are written to be aggregation-friendly (avoid patterns that prevent agg hits)
  • **Monitoring** — Track aggregation hit rates as a key performance indicator

Frequently Asked Questions

How do I know if I need aggregations? If your DirectQuery queries consistently take more than 3 seconds and your users query at a grain coarser than the detail table, aggregations will help. If queries are already fast or users need transaction-level detail for most queries, aggregations provide minimal benefit.

Can aggregations work with Direct Lake mode in Fabric? Direct Lake mode does not currently support user-defined aggregations because the VertiPaq engine reads Parquet files directly. However, you can create materialized aggregation tables in the lakehouse that Direct Lake reads as separate tables with explicit measures.

**How often should aggregation tables refresh?** Match the refresh frequency to user expectations. If users expect data from today, daily aggregation refresh is minimum. For real-time dashboards, consider streaming patterns instead of aggregations.

What happens if my aggregation table has stale data? Users querying at the aggregation grain see stale data. Users drilling to detail see current DirectQuery data. This inconsistency confuses users — keep aggregation refresh aligned with DirectQuery source updates.

Next Steps

Aggregations are the highest-impact performance optimization for large-scale Power BI deployments. Properly designed aggregations deliver 10-100x query speed improvements for the majority of user interactions. Our Power BI architecture team conducts aggregation design workshops that analyze your query patterns, design optimal aggregation hierarchies, and implement production-ready composite models. Contact us to accelerate your aggregation implementation.

**Related resources:** - Composite Models Guide - DAX Performance Optimization - DirectQuery Optimization - Power BI Architecture Services

Enterprise Implementation Best Practices

Deploying composite models with aggregations in production enterprise environments introduces architectural complexity that requires careful planning, rigorous testing, and ongoing operational discipline. Having implemented aggregation patterns for organizations processing 10 billion+ row datasets across financial services, healthcare, and manufacturing, these practices determine whether aggregations deliver the promised performance gains or create new operational headaches.

  • **Profile query patterns for at least two weeks before designing aggregations.** Use DAX Studio Server Timings and Log Analytics to capture real user query patterns. Design aggregation grain and columns based on actual usage, not assumptions about how users interact with reports. Aggregations built on assumptions typically achieve 30-40% hit rates. Data-driven aggregation designs achieve 70-90% hit rates.
  • Implement multi-level aggregation hierarchies for datasets exceeding 1 billion rows. A single aggregation level leaves too many queries falling through to DirectQuery. Build at minimum yearly, monthly, and daily aggregation levels. The incremental storage cost of multi-level aggregations (typically 1-5% of detail table size) is insignificant compared to the DirectQuery cost savings and performance improvement.
  • Set all dimension tables to Dual storage mode. This is the single most common configuration mistake in composite model implementations. If dimension tables remain in DirectQuery mode while aggregation tables are Import mode, aggregation hits fail because the engine cannot join Import aggregations with DirectQuery dimensions. Dual mode enables dimension tables to participate in both Import and DirectQuery query paths.
  • Monitor aggregation hit rates weekly during the first quarter. Deploy a monitoring report that tracks hit rates per aggregation level using DAX Studio trace data or capacity metrics. Set an alert for hit rates dropping below 60% — this indicates that user query patterns have shifted or new visuals bypass aggregation coverage. Adjust aggregation design iteratively based on hit rate telemetry.
  • **Maintain aggregation ETL alongside detail table ETL.** Aggregation tables must refresh whenever the underlying detail data changes. Build aggregation table refresh into your data pipeline as a dependent step that runs immediately after detail table loads. Stale aggregation data creates inconsistencies where summary views show different numbers than detail drilldowns — this destroys user trust.
  • Test DirectQuery fallthrough performance independently. When queries miss aggregations and fall through to DirectQuery, the source database must handle them efficiently. Create covering indexes, maintain statistics, and implement materialized views on the source side for common fallthrough query patterns. Aggregations do not eliminate DirectQuery requirements — they reduce the volume.
  • **Document aggregation mappings in your governance framework.** Every aggregation table should have documented: grain definition, column mappings, expected hit rate targets, refresh schedule, and the queries it was designed to cover. Without documentation, future developers cannot maintain or optimize the aggregation architecture.
  • **Plan capacity for both Import and DirectQuery workloads.** Composite models consume capacity for Import mode storage and refresh (aggregation tables) plus DirectQuery query processing (fallthrough queries). Size your Fabric capacity for the combined workload, not just one side.

Measuring Success and ROI

Aggregation implementations should deliver quantifiable performance improvements and cost savings. Track these metrics to validate the investment and identify optimization opportunities.

Performance metrics: - Aggregation hit rate: The primary success metric. Measure the percentage of user queries served by Import-mode aggregation tables versus DirectQuery fallthrough. Target 70-90% for a well-designed aggregation architecture. Each percentage point improvement reduces both query latency and source database load. - Average query response time: Compare P50 and P90 query response times before and after aggregation deployment. Properly designed aggregations deliver 10-100x improvement for covered queries — sub-second response for queries that previously took 5-15 seconds through DirectQuery. - DirectQuery source load reduction: Monitor query volume and CPU utilization on your source database. Effective aggregations reduce DirectQuery queries by 60-80%, freeing source database capacity for other workloads and potentially enabling downsizing. - Capacity cost efficiency: Calculate the cost per query before and after aggregations. Import-mode queries consume less capacity CU than DirectQuery queries. For organizations on Fabric F64+ capacity, aggregations typically reduce per-query cost by 40-70%, translating to either direct savings through capacity downsizing or the ability to support more users on existing capacity. - User adoption and engagement: Track report usage metrics through the Activity Log. Reports that respond in under 2 seconds consistently show 30-50% higher adoption rates than reports with 5+ second response times. Aggregations directly enable the sub-second response threshold that drives executive engagement.

For expert help implementing composite models and aggregations in your enterprise, contact our consulting team for a free assessment.``` User clicks slicer or visual -> Power BI engine parses DAX query -> Check: Do aggregation mappings cover all required columns? -> YES: Route to Import aggregation table (sub-second) -> NO: Route to DirectQuery detail table (2-10 seconds) -> Return results to visual ```

This routing is completely transparent to users and report developers. No DAX changes are required. The engine handles routing automatically based on aggregation mappings configured in the model.

Aggregation Design Methodology

Designing effective aggregations requires understanding your query patterns, data distribution, and user behavior.

Step 1: Analyze Query Patterns

Before creating aggregation tables, profile which queries users actually run. This prevents building aggregations nobody uses.

Tools for query analysis:

ToolWhat It RevealsHow to Access
Performance AnalyzerPer-visual DAX query and execution timePower BI Desktop, Performance Analyzer pane
DAX Studio query logDetailed engine query plansConnect DAX Studio to Power BI Desktop
Fabric Capacity MetricsTop queries by CPU consumptionFabric Capacity Metrics app
Log AnalyticsHistorical query patterns across all usersAzure Log Analytics workspace
VertiPaq AnalyzerModel statistics and memory usageDAX Studio VertiPaq Analyzer tab

What to look for: - Most common grouping dimensions (Date grain, Product category, Region) - Most common aggregation functions (SUM, COUNT, AVERAGE, DISTINCTCOUNT) - Queries that hit DirectQuery and take longer than 3 seconds - Percentage of queries that could be answered by pre-aggregated data

Step 2: Define Aggregation Grain

The grain of your aggregation table determines which queries it can answer.

Grain selection examples:

Detail Table GrainAggregation GrainSize ReductionQueries Covered
Individual transactionsDaily by Product by Region100x-1000xDaily and above time analysis
Hourly sensor readingsDaily by Equipment24x minimumDaily trends, weekly/monthly rollups
Line-item salesMonthly by Category by Store500x-5000xMonthly executive dashboards
Click-stream eventsHourly by Page by Campaign50x-100xCampaign performance analysis

Rule of thumb: Choose the finest grain that still achieves a 10x+ size reduction. Finer grain = more queries covered. Coarser grain = smaller table, faster queries, but more fallthrough to DirectQuery.

Step 3: Build the Aggregation Table

Create the aggregation table in your data source (data warehouse, lakehouse) or as a Power Query computed table.

Aggregation table design principles: - Include all dimension keys needed for common queries - Pre-compute SUM, COUNT, MIN, MAX for each measure - Include DISTINCTCOUNT only when specifically needed (most expensive aggregation) - Add a row count column for COUNT aggregation support - Maintain the aggregation table through ETL alongside your detail table

Example aggregation table DDL:

```sql CREATE TABLE Agg_Sales_Daily AS SELECT DateKey, ProductCategoryKey, RegionKey, CustomerSegmentKey, SUM(Revenue) as TotalRevenue, SUM(Cost) as TotalCost, SUM(Quantity) as TotalQuantity, COUNT(*) as TransactionCount, COUNT(DISTINCT CustomerKey) as UniqueCustomers FROM Sales_Detail GROUP BY DateKey, ProductCategoryKey, RegionKey, CustomerSegmentKey ```

Step 4: Configure Aggregation Mappings

In Power BI Desktop, configure the aggregation table to map to the detail table.

Mapping configuration:

Aggregation ColumnFunctionDetail Column
TotalRevenueSumSales_Detail[Revenue]
TotalCostSumSales_Detail[Cost]
TotalQuantitySumSales_Detail[Quantity]
TransactionCountCountSales_Detail[TransactionID]
UniqueCustomersDistinctCountSales_Detail[CustomerKey]
DateKeyGroupBySales_Detail[DateKey]
ProductCategoryKeyGroupBySales_Detail[ProductCategoryKey]
RegionKeyGroupBySales_Detail[RegionKey]
CustomerSegmentKeyGroupBySales_Detail[CustomerSegmentKey]

After configuring mappings: - Set the aggregation table storage mode to Import - Set the detail table storage mode to DirectQuery - Set all shared dimension tables to Dual mode - Hide the aggregation table from report view (users should never interact with it directly)

Multi-Level Aggregation Hierarchies

For very large datasets, a single aggregation level may not be sufficient. Multi-level hierarchies provide additional acceleration.

Three-level aggregation example:

``` Level 1: Agg_Sales_Yearly (Import) - ~10K rows Covers: Annual executive summaries, YoY comparisons | Level 2: Agg_Sales_Monthly (Import) - ~500K rows Covers: Monthly trends, quarterly analysis, MTD calculations | Level 3: Agg_Sales_Daily (Import) - ~10M rows Covers: Daily analysis, weekly rollups, WoW comparisons | Detail: Sales_Detail (DirectQuery) - ~5B rows Covers: Transaction-level drilldown, ad-hoc detail queries ```

How multi-level routing works: The engine checks from the coarsest aggregation first. If Level 1 can answer the query, it stops there. Otherwise, it tries Level 2, then Level 3, and finally falls through to the detail table. Each level reduces the probability of hitting DirectQuery.

Aggregation hit rate targets by level:

LevelTarget Hit RateCumulative Coverage
Level 1 (Yearly)10-15% of queries10-15%
Level 2 (Monthly)30-40% of queries40-55%
Level 3 (Daily)30-35% of queries70-90%
Detail (DirectQuery)10-30% of queries100%

Performance Monitoring and Tuning

Measuring Aggregation Effectiveness

DAX Studio aggregation analysis:

Connect DAX Studio to your Power BI model and execute queries while monitoring the Server Timings pane. Look for:

  • VertiPaq SE queries only = Aggregation hit (Import mode served the query)
  • DirectQuery events present = Aggregation miss (query fell through to source)

Systematic aggregation coverage analysis:

  1. Extract all DAX queries from Performance Analyzer for each report page
  2. Run each query in DAX Studio and check for DirectQuery events
  3. Calculate aggregation hit rate: (queries with no DQ events) / (total queries)
  4. For queries with DQ events, analyze which columns caused the miss
  5. Adjust aggregation grain or add columns to cover more queries

Common Aggregation Miss Causes

CauseSolution
Filter on column not in aggregationAdd the column to aggregation GroupBy
DISTINCTCOUNT not mappedAdd DISTINCTCOUNT column to aggregation table
DAX measure uses CALCULATE with complex filterSimplify measure or accept DQ fallthrough
Date grain too coarse for queryAdd finer-grain aggregation level
Cross-table filter propagationEnsure dimension tables are Dual mode
Field parameters in useField parameters may prevent aggregation matching

DirectQuery Source Optimization

When queries fall through to DirectQuery, source database performance becomes critical.

Source-side optimizations:

  • Create covering indexes for common query patterns
  • Maintain up-to-date statistics on aggregated columns
  • Implement materialized views at the database level as an additional caching layer
  • Use columnstore indexes for analytical query patterns
  • Monitor and optimize the queries Power BI generates (capture with database profiling tools)

**For detailed DirectQuery optimization, see our DirectQuery optimization guide.**

Aggregation Patterns for Specific Industries

Financial Services

DataDetail GrainAggregation GrainKey Metrics
Trade dataIndividual tradesDaily by instrument by deskVolume, PnL, risk exposure
Transaction dataIndividual transactionsDaily by account type by branchTransaction count, amounts, fees
Risk metricsHourly calculationsDaily by portfolio by risk factorVaR, stress test results

Healthcare

DataDetail GrainAggregation GrainKey Metrics
Patient encountersIndividual encountersMonthly by department by diagnosisPatient volume, LOS, readmission rates
Claims dataIndividual claimsMonthly by payer by procedureClaim amounts, denial rates
Clinical measuresIndividual measurementsWeekly by unit by measure typeQuality scores, compliance rates

Retail

DataDetail GrainAggregation GrainKey Metrics
POS transactionsLine itemsDaily by store by categoryRevenue, units, margin
InventoryDaily snapshotsWeekly by warehouse by SKUStock levels, turnover rate
E-commerceClick eventsHourly by page by campaignConversion rate, cart abandonment

Integration with Other Patterns

Aggregations work best when combined with other enterprise patterns:

  • **Incremental refresh** — Apply incremental refresh to both aggregation and detail tables for efficient data loading
  • **Composite models** — Aggregations are a core composite model pattern; see our composite models guide for broader architecture context
  • **Star schema design** — Aggregations work most effectively on properly designed star schemas where dimension relationships are clean
  • **DAX optimization** — Ensure DAX measures are written to be aggregation-friendly (avoid patterns that prevent agg hits)
  • **Monitoring** — Track aggregation hit rates as a key performance indicator

Frequently Asked Questions

How do I know if I need aggregations? If your DirectQuery queries consistently take more than 3 seconds and your users query at a grain coarser than the detail table, aggregations will help. If queries are already fast or users need transaction-level detail for most queries, aggregations provide minimal benefit.

Can aggregations work with Direct Lake mode in Fabric? Direct Lake mode does not currently support user-defined aggregations because the VertiPaq engine reads Parquet files directly. However, you can create materialized aggregation tables in the lakehouse that Direct Lake reads as separate tables with explicit measures.

**How often should aggregation tables refresh?** Match the refresh frequency to user expectations. If users expect data from today, daily aggregation refresh is minimum. For real-time dashboards, consider streaming patterns instead of aggregations.

What happens if my aggregation table has stale data? Users querying at the aggregation grain see stale data. Users drilling to detail see current DirectQuery data. This inconsistency confuses users — keep aggregation refresh aligned with DirectQuery source updates.

Next Steps

Aggregations are the highest-impact performance optimization for large-scale Power BI deployments. Properly designed aggregations deliver 10-100x query speed improvements for the majority of user interactions. Our Power BI architecture team conducts aggregation design workshops that analyze your query patterns, design optimal aggregation hierarchies, and implement production-ready composite models. Contact us to accelerate your aggregation implementation.

**Related resources:** - Composite Models Guide - DAX Performance Optimization - DirectQuery Optimization - Power BI Architecture Services

Frequently Asked Questions

What are aggregations in Power BI and when should I use them?

Aggregations are pre-summarized Import mode tables that Power BI automatically queries instead of hitting large DirectQuery detail tables. Example: 10 billion row FactSales (DirectQuery) + 100 million row AggSales_Daily (Import with daily granularity). User queries sales by month—Power BI routes to AggSales_Daily (fast Import query) instead of FactSales DirectQuery. User drills to transaction detail—Power BI automatically switches to FactSales DirectQuery. Use aggregations when: (1) Fact tables exceed 1 billion rows making Import impractical, (2) Most queries are summary level (80% monthly/daily aggregates, 20% detail), (3) DirectQuery performance unacceptable (multi-second visual rendering). Setup: create aggregation table matching fact table schema but summarized (SUM, COUNT, MIN, MAX), set storage mode to Import, define aggregation mappings (GroupBy columns match dimensions, Detail Table points to source). Power BI Aggregation Manager auto-detects when to use aggregations—no DAX changes needed. Performance improvement: 10-100x faster for aggregate queries. Cost: aggregation storage (typically 1-5% of detail table size), refresh time for aggregation tables. Best practice: start with date granularity aggregations (daily, monthly), add product/customer aggregations based on query patterns. Monitor using Performance Analyzer—verify queries hit aggregations not detail table.

How do I create aggregation tables in Power BI composite models?

Aggregation creation workflow: (1) Identify slow DirectQuery tables and common query patterns via Premium Metrics app, (2) Create aggregation table in source database or Power Query—SELECT Date, ProductKey, CustomerKey, SUM(Amount) as TotalAmount FROM FactSales GROUP BY Date, ProductKey, CustomerKey, (3) Load aggregation as Import mode table in Power BI model, (4) Configure aggregation mappings: Model → Manage Aggregations → select aggregation table → map columns to detail table (GroupBy for dimensions, Sum/Count/Min/Max for measures, DetailTable=FactSales), (5) Set detail table to DirectQuery storage mode, (6) Test—query should automatically use aggregation when applicable. Multiple aggregation layers possible: AggSales_Daily (Import), AggSales_Monthly (Import), FactSales (DirectQuery)—Power BI chooses most detailed aggregation matching query. Automatic vs manual: Power BI auto-creates aggregations in some scenarios (Direct Lake automatic aggregations in Fabric), manual creation gives more control. Validation: use DAX Studio or Performance Analyzer to verify query plan shows aggregation table usage. Common mistakes: (1) Aggregation grain too detailed (daily when monthly sufficient)—wastes Import storage, (2) Missing columns—query cannot use aggregation if filters columns not in aggregation, (3) Incorrect mappings—GroupBy vs Sum confusion causes wrong results. Testing: compare query results with aggregations enabled vs disabled—should return identical results, just faster. Document aggregation strategy for maintenance—future developers need to know which tables are aggregations.

What is the difference between composite models and dual storage mode?

Composite models allow mixing storage modes (Import, DirectQuery, Dual) within single Power BI dataset—previously all tables same mode. Dual storage mode is specific table configuration in composite models. Dual table behavior: acts as Import when queried alone or with other Import/Dual tables, acts as DirectQuery when queried with DirectQuery tables. Use case: dimension tables set to Dual—join to Import fact tables as Import, join to DirectQuery fact tables as DirectQuery. Example: DimProduct (Dual) + FactSales_Summary (Import) + FactSales_Detail (DirectQuery). Query sales summary by product—DimProduct acts as Import (joins to FactSales_Summary Import). Drill to detail—DimProduct acts as DirectQuery (joins to FactSales_Detail DirectQuery). Benefits: (1) Dimension tables loaded once (smaller than facts), (2) Flexible join behavior, (3) Reduced model complexity. Gotcha: Dual tables count toward Import storage and refresh time—not free. When to use Dual: shared dimension tables in composite models with mixed storage modes. When to use DirectQuery for dimensions: dimensions larger than capacity memory, real-time dimension updates required. Best practice: dimension tables Dual, fact tables Import (aggregations) or DirectQuery (detail), relationship between facts and Dual dimensions seamless. Alternative: separate Import and DirectQuery models—cleaner architecture but requires two datasets and limited cross-querying. Composite models with Dual storage mode provide best of both worlds—unified model with flexible performance optimization.

Power BIComposite ModelsAggregationsPerformanceScale

Industry Solutions

See how we apply these solutions across industries:

Need Help With Power BI?

Our experts can help you implement the solutions discussed in this article.

Ready to Transform Your Data Strategy?

Get a free consultation to discuss how Power BI and Microsoft Fabric can drive insights and growth for your organization.