MTHMOVn returns and n day moving average; however, it skips the first 6 days of each month.
SYNTAX:
MTHMOVn(Cx)
where :
Cx is a conditional variable x
n specifies the number of days to average as a moving average. For daily detail variables, this specifies the number of slots (i.e., hours for hourly variables).
NOTES:
n must be between 1 and 100
This function requires the target and source variable frequencies to match. E.g. Hourly target variable = Hourly source variable, 5-Minute Target variable = 5-Minute Source Variable. If the frequencies do not match, the function will return incorrect values.
EXAMPLE 1: Return the 7 day Moving Average starting on the 7th day for a daily variable.
Source variable (71) is set to Daily and Target variable (115) is also set to Daily. Because both the Source and Target variables are the same (Daily), the time increment BYDAY will be used.
V121 = MTHMOV7(C70)
Variable 121 will be a 7 day moving average of variable 70, with days 1-6 of each month left blank (NULL):
Example 2: Return the seven hour Moving Average starting on the 7th day from an hourly variable.
Source variable (4714) is set to Hourly and Target variable (4715) is set to Hourly.
V4714 - Is a hourly parameter
V4715 - Is a hourly calculation
V4715 = MTHMOV7(V4714)
Our results will be as follows:
See: Working with Daily Detail Variables in Calculations.