Efficiency and refresh plan
Choose storage from the reporting contract
This hypothetical model has a daily freshness objective and a small, bounded Import footprint. Import is the baseline for the teaching fixture. DirectQuery might be preferable for a separate near-real-time requirement, but source concurrency, authorization, freshness and workload must be tested; do not claim it is automatically faster. A CSV is not evidence of a foldable production source. Review storage architecture from Chapters 33–37.
Refresh plan and key boundaries
Use full replacement of the tiny offline CSV snapshot. For an approved scalable relational source, a candidate incremental policy retains 12 months and refreshes one month daily. Configure typed RangeStart and RangeEnd parameters and use a half-open predicate:
Table.SelectRows(Source, each [EventUtc] >= RangeStart and [EventUtc] < RangeEnd)This expression is a fragment: Source and parameters must already exist, and timestamps must use the UTC contract. Verify folding in the actual connector. Use fixed Jan and Feb 2025 intervals offline; service-managed rolling periods are not those fixed historical dates. Record last successful refresh separately from failed attempts.
Worked example 1 — historical correction
Baseline January has four rows with revenue 250, February four with 300. The corrected source raises S01 January revenue by 10 and adds February S09 at 40 revenue, 25 cost. Refreshing February alone produces 9 rows and revenue 590, leaving a historical discrepancy of 10 versus the corrected source 600. Replace January too; final cost 370 and profit 230. The half-open boundary assigns the February 1 midnight sale to February only. Validate source key uniqueness, coverage and totals before atomic promotion. Replay of the same replacement must leave results unchanged; duplicate or unknown-region input is rejected. Actual service processing and transaction behavior require separate testing.
Worked example 2 — efficiency before speed
The baseline diagnostic token has eight distinct values across eight sales, while RegionKey has two. A wide model includes the token; a lean model excludes it but retains SaleKey for traceability. Expected baseline revenue 550 and both role totals must match for each candidate, including blank results. Higher cardinality can increase storage demands, but these counts do not predict native bytes or compression ratios. Use Performance Analyzer to extract a visual query; DAX Studio runs repeated cold/warm measurements in a disposable local model. Fill benchmark-template.csv with observed duration, FE/SE and bytes only when available. Five cold and five warm runs per candidate; compare medians in separate cache conditions. Record build, hardware, data, role and query. Native results are NOT RUN.
Avoid false optimization and stale releases
Changing a relationship or pre-aggregating away required detail can make a fast result wrong. Compare identical queries and identities before timing. Do not clear caches on shared production models. A rolling refresh policy alone does not guarantee old corrections or hard deletes are captured; identify affected partitions and approve bounded backfill or full rebuild. If validation fails, preserve the last good snapshot and flag data as stale. Retest both positive and denied cases after refresh.
Practice and references
Explain the January correction gap, compute corrected totals by viewer, and design a failed-refresh and replay test. Explain which columns can be removed without changing required reporting. Complete a proposed benchmark protocol, leaving timing fields NOT RUN when native tools are absent. See storage modes, incremental refresh configuration, Performance Analyzer and DAX Studio benchmark.