Model efficiency
Optimize to a defined report contract
Model efficiency is about serving required business questions with appropriate memory, refresh and query costs. First list the grain, fields, metrics, filters, relationships, sorting, drillthrough, security and downstream dependencies that must survive. Remove unused fields only after this review. A lean design is equivalent for a declared report contract, not for every possible query. Test results before claiming a benefit.
Compare two controlled Import models
Create two disposable models using the same two dates, twelve sales rows and three products. Keep the product dimension and one-way one-to-many relationship identical. Baseline has TraceId, EventTime and a DAX LineAmount calculated column; lean removes these and uses the SUMX measure from lesson 2. Both retain SaleDate, ProductKey, Quantity and UnitPrice. Keep automatic date/time off for both, and match data types, source locale, compatibility and refresh procedure. Calculated columns are stored and may compress differently from source columns. Avoid rounding or changing types just to save memory; fixed-decimal and floating-point arithmetic can differ. The fixture uses small whole-number amounts to make parity exact.
Example 1 — validate grouped and total results
Create the Revenue measure appropriate to each model and Units = SUM(Sales[Quantity]). Run separately against A and B:
EVALUATESUMMARIZECOLUMNS(Product[Category], Sales[SaleDate], "Revenue", [Revenue], "Units", [Units])ORDER BY Product[Category], Sales[SaleDate]Expected six rows: A 30/3, B 60/3, C 90/3, each repeated on both dates. Total revenue 360 and units 18. Test a nonexistent key (blank revenue/units) and a two-key selection (A+B: 180/12). The lab contains a read-only query file for this contract. A trace-level export cannot be reproduced by B and is explicitly out of scope.
Example 2 — record actual size rather than a prediction
Open each fully refreshed disposable model in an approved DAX Studio build, connect to the local Desktop instance, and run View Metrics. Record model total memory, table/column data and dictionary sizes, hierarchy and relationship metrics if exposed, row and distinct counts, compatibility and partition counts. Export a local VPAX only from synthetic data, if approved. Repeat after verifying identical model settings. Record PBIX file size separately if desired; it includes report and other persisted contents and is not the same metric as in-memory model size. The lab includes a blank measurement worksheet: native A/B sizes are NOT RUN, not zero. Report an actual reduction only when comparable measurements exist.
Common mistakes and trade-offs
Do not remove the ProductKey foreign key, which enables category filtering. Do not preaggregate to category/day if later users need transaction-level analysis or distinct customer counts. Do not hide a column and report a memory reduction. Moving an expensive expression to Power Query or a warehouse may improve refresh design but can alter source cost, precision and folding; measure the entire path. SUMX may increase query work even if dropping a stored calculated column lowers memory. Compare one change at a time in a follow-up experiment if attribution matters.
Practice — propose a measured rollout
Fill the worksheet with the expected parity outputs; mark the actual memory fields NOT RUN if no approved local engine exists. Add a stakeholder requirement for minute-level audit drillthrough: decide whether the lean model remains acceptable. Propose a separate secured audit data path or retain the field, with a new parity contract. Do not claim a size improvement from fewer columns alone. Sources: https://daxstudio.org/docs/features/model-metrics/ ; https://learn.microsoft.com/en-us/power-bi/guidance/import-modeling-data-reduction ; https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-relationships-understand