For rolling-period measures: given a starting date, a count and an interval, this DAX time intelligence function returns the matching span of dates, which normally extends backwards.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains DATESINPERIOD in context, with comparison tables and the common traps.
Terms in this definition
- COUNT
A DAX function returning how many non-blank numbers, dates or text values a column contains. Boolean columns need COUNTA instead, and for counting the rows of a table COUNTROWS is the better choice.
- DAX
Short for Data Analysis Expressions, the formula language you write measures, calculated columns and row-level security rules in, within tabular semantic models in Power BI, Excel Power Pivot or Analysis Services.
- Time intelligence
Covers DAX functions (TOTALYTD, DATEADD, SAMEPERIODLASTYEAR and others) that shift or accumulate filtered dates. Classic versions require a contiguous, marked date table; calendar-based versions, still in preview, rely on defined calendars.
- Span
One operation inside a trace, such as a single LLM call or prompt flow node, carrying attributes plus start and end times. Nested spans reveal the order of calls.