Aggregations and query reduction
A summary must preserve the reporting grain
An aggregation is a smaller table containing precomputed values at a specified grain. A month-region summary can answer revenue by month and region, but cannot recover customer details. An aggregation that answers the wrong question quickly is a defect. Keep fact grain and freshness explicit.
Map the aggregation to the detail model
Use Sales at transaction grain in DirectQuery and an imported SalesAgg at month-region grain. For a supported relational model, configure Manage aggregations: SalesAgg[MonthKey] and [Region] map with GroupBy to corresponding Sales columns, [RevenueCents] maps with Sum to Sales[RevenueCents], [Quantity] with Sum to Sales[Quantity]. Use appropriate same-source dimensions and compatible types; hide the summary from consumers. Queries still reference detail-table measures. An eligible rewrite is a hypothesis, not proof of a hit. For report interactions use an Apply button or query reduction options where supported, reduce redundant visuals and record observed request counts.
Example 1 — verify additive parity
The lab summary groups eight sales into four rows. Hand-written oracle SQL:
SELECT MonthKey, Region, SUM(RevenueCents) AS RevenueCents, SUM(Quantity) AS QuantityFROM Sales GROUP BY MonthKey, Region ORDER BY MonthKey, Region;Expected Jan North 180, Jan South 120, Feb North 150, Feb South 90. Total 540, units 12. Summing summary rows for January yields 300, equal to detail. A weighted price must divide total revenue by total quantity, not average subgroup prices. DIVIDE(SUM(Sales[RevenueCents]), SUM(Sales[Quantity])) predicts 45 cents overall.
Example 2 — prove a miss and detect stale data
A customer C1 filter cannot be resolved from month-region alone: C1 total is 260, but the summary has no CustomerKey. A detail query must remain available. Distinct customer counts are also not additive across groups. The lab adds a simulated new February North sale of 30 cents in a separate snapshot table. The original summary still totals 540, new detail totals 570. Do not compare these different versions as an optimization parity test. Trace aggregate rewrite events or source activity on a real model before reporting hits/misses.
Automatic versus manual aggregation
Manual summaries require explicit mappings and refresh synchronization. Automatic aggregations use historical query patterns to choose cached summaries on eligible service configurations; training chooses structures and refresh populates them. Check current capacity, connector and model-owner permissions. No fixed hit rate is guaranteed. Import aggregation tables can be ignored for SSO-enabled sources; do not disable SSO merely to improve speed. Dynamic M query parameters have documented aggregation limitations. Treat security and refresh requirements as release gates.
Practice — choose the summary grain
Compute February revenue and units from both representations. Explain why adding a CustomerKey filter makes the existing aggregation insufficient. Specify which snapshot to compare and what native evidence proves a rewrite. Describe a report Apply-button test with identical final filter states.
Sources consulted 2026-11-29: aggregations-advanced, aggregations-auto, composite-model-guidance. Installed connector and native engine not tested.