MGMC returns a Monthly geometric mean of a specified variable, converting zeros to one. The value is placed on the last day of the month.
SYNTAX:
MGMC(Cx, optional Time Increment)
where :
Cx is a conditional variable x
Time Increment Optional - specifies the source variables (Cx) Frequency when the Source Variable (CX) and target variable's (i.e. the variable being calculated) frequencies do not match.
NOTES:
The variable being averaged must be specified as a Conditional Variable (use "C" instead of "V")
The result is stored based on target variables frequency:
In all cases: blank and negative values are ignored in the calculation and all zeros (0) are converted into ones (1).
EXAMPLE 1: Return the Monthly geometric mean from a variable, converting zeros to one
Source variable (71) is set to Daily and Target variable (107) is also set to Daily. Because both the Source and Target variables are the same (Daily), the time increment BYDAY will be used.
V107 = MGMC(C71)
Variable 107 will contain the geometric mean of variable 71 on a monthly basis, having the value stored on the last day of the month.
EXAMPLE 2: Return the Monthly geometric mean from an Hourly variable into a Daily Calculation, converting zeros to one.
Source variable (71) is set to Hourly and Target variable (107) is set to Daily.
V71 - Is a hourly parameter
V107 - Is a daily calculation
V107 = MGMC(C71,BYHOUR)
Note: You MUST specify the Time Increment (BYHOUR) that matches the source variables frequency (IE the source variable V71 is Hourly, therefore we specify BYHOUR) in order for the function to return the correct value.
See: Working with Daily Detail Variables in Calculations.