# What must I define before using WINDOW for a rolling DAX calculation?

Exam: DP-600 — Implementing Analytics Solutions Using Microsoft Fabric
Knowledge domain: Implement and manage semantic models (25–30%)
Updated: 2026-11-19T05:35:28.301428+00:00
HTML: https://learningpathx.com/faq/DP-600/dp600-dax-window-deterministic-order.html

## Also asked as

- How do I make a DAX WINDOW calculation deterministic?
- What ordering and partition rules does a DAX rolling window need?

Define the input relation, independent partitions, deterministic ordering, and the window boundaries before using WINDOW. Also specify whether the calculation means a number of rows or an actual calendar interval; these aren't interchangeable.

WINDOW returns rows in an interval, which an aggregation such as SUMX or AVERAGEX can consume. Relative boundaries are positions around the current row; absolute boundaries are positions within the partition. For a product-specific running result, partition by product and order by a stable date or sequence at the required grain.

Check these conditions:

* Can the ordering and partition keys identify rows uniquely? If not, define a meaningful tie-breaker or matching key.
* Should the window respect the selected set or include periods outside the visible selection?
* Does a missing date mean no row, a zero value, or an invalid period?
* What should happen at the start of each partition and at totals?

A three-row window over sales dates can mean the last three dates with sales, not three consecutive calendar days. Use a complete Date relation when calendar-day semantics require it. Validate ties, gaps, partition boundaries, selections, and totals with a small ordered dataset before tuning performance.

[WINDOW reference](https://learn.microsoft.com/en-us/dax/window-function-dax).

Source: [DP-600: Advanced DAX Patterns for Enterprise Semantic Models](https://learningpathx.com/news/dp-600-advanced-dax-patterns-for-enterprise-semantic-models.html)
