# Construct Moving Average

Constructs a **Pick Any** question where each sub-variable matches a range of dates that you can use to construct moving average crosstabs.

The function is accessed by right-clicking your date variable on the **Variables and Questions tab** and selecting **Insert Ready-Made Formula(s) > Construct Moving Average**.

**Input dates**The date question you selected as the basis for the moving average.

**Start/End**The range of dates found in the date question.

**Unit length**The number of time units (see**Unit**) to include in each data point.

**Unit**The units for**Unit length**. For example, if**Unit length**is 2 and**Unit**is Month then each data point will cover two months.**Moving average**The number of data points to average over. For example, if you select 4 here and your data points cover two months each, then each point in the moving average will cover eight months.**Labels**How to label the points in the moving average. Choose End Points to use the full date range. e.g. Apr 08 - Jun 08. Choose Midpoint to use the date midway through. e.g. 15 May 08. Use Last Point to use the final date in the range. e.g. Jun 08.**Start date/End date**The date range over which to construct the moving average. If you expect your raw data file to be updated with new data then be sure to include extra dates to avoid having to recreate the moving average later.