Time intelligence in DAX requires a properly configured date table. Mark a table as the date table in the Modeling tab, ensure it contains a continuous, unique list of dates with no missing values, and then build relationships from fact tables to this date dimension. Without this prerequisite, time intelligence functions may produce unreliable results.
Standard period-to-date measures are simple wrappers around CALCULATE. DATESYTD returns dates from the start of the year up to the current context, giving you a year-to-date measure. DATESQTD and DATESMTD perform the same role at quarter and month granularity. For fiscal years that do not align with the calendar, pass a year-end date as the second argument: DATESYTD('Date'[Date], "06/30") gives fiscal-year-to-date for a fiscal year ending June 30. The DATESBETWEEN function returns a table of dates between two boundaries and is useful for custom date windows that do not fit a named function.
For comparing to prior periods, SAMEPERIODLASTYEAR returns a table of dates shifted by one year at the same grain as the current context, skipping dates that did not exist in the prior year. DATEADD shifts the existing period grain by a number of intervals and is more flexible, supporting months, quarters, and days. PARALLELPERIOD always returns the full period at the level specified; for example, even if you are filtered to mid-month, PARALLELPERIOD at the month level returns the entire prior month. A common rolling-window pattern is DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -30, DAY), which yields the last 30 days from the current maximum date. Combine this with AVERAGEX or SUMX to produce rolling averages or trailing totals like trailing 12 months. Be aware that only one time intelligence filter can apply at a visual level at a time; when you stack YTD and PY logic naively, one filter wins. Calculation groups solve this elegantly.