Home : Products : Hach WIMS : Hach WIMS Client : Documentation : Function Reference : Math Toolbox Functions : WGMCn
Q10913 - INFO: WGMCn

WGMCn returns a weekly geometric mean from a specified variable, Cx, beginning with the day of the week specified by n.
(For N=7, the week is Sunday through Saturday.) 

SYNTAX:

WGMCn(Cx, optional Time Increment)
where :
n specifies the Week Definition, which determines the begining and end of the week.
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 result of the function is stored on the last day of the defined week (n).

Zero values are converted to one by this function.

  • To ignore zeros, see WGMn.
  • To add one to all values, see WGMPn.

The result is stored based on target variables frequency:

  • Daily - Last day of the month.
  • Daily Detail - First slot on the last day of the month.

EXAMPLE 1: Return the Weekly geometric mean from a variable, convert all zeros to one

Source variable (71) is set to Daily and Target variable (148) is also set to Daily. Because both the Source and Target variables are the same (Daily), the time increment BYDAY will be used.

V148 = WGMC7(C71)

Variable 148 is the Weekly geometric mean (Sunday through Saturday, n = 7) of variable 71.  The sample calculation below also has WGMn and WGMPn for comparison, the results for this example are highlighted in green:

EXAMPLE 2: Return the Weekly geometric mean from an Hourly variable into a Daily Calculation, convert all zeros to one.


Source variable (71) is set to Hourly and Target variable (148) is set to Daily.

V71 - Is a hourly parameter
V148 - Is a daily calculation

V148 = WGMC7(V71,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.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 4/15/2008 1:56 PM.
Last Modified on 2/9/2015 2:09 PM.
Last Modified by No Author Name Available!.
Article has been viewed 3835 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article