GSV returns the number of times a sample was missed based on a sampling requirement.
VarNum: The variable number to get the average for.
GroupOffset/StartDate: Used with the Grouping parameter to set the dates to calculate the stat for. Sets the number of Groups (set by the Grouping Parameter) to be added to set the dates. See examples below. If this field is a date string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the start date to calculate the stat for.
Grouping/EndDate: Used to set which dates to calculate the stat for. If the Grouping is a date literal string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the end date to calculate the stat for. Common Groupings are:
"R" Report Dates
Click here for availiable Grouping options
Sampling_Requirement: Sets how often the variable is suppose to be sampled in the form number/group (i.e. 1/Day, 3/Month, 3/WK),Weekdays (MWF), or number (1). Valid groups are:
Wk,Week - Week is defined as Sunday-Saturday
Wkn,Weekn - Week defined by n. Click here for week definitions.
Month,Mth - Month
Qtr,Q - Quarter
To specify certain weekdays, build a string of the following:
Su - Sunday
M - Monday
Tu - Tuesday
W - Wednesday
Th - Thursday
F - Friday
Sa - Saturday
If just a number is specified it sets the requirement for the entire data range specified by the GroupOffset/StartDate and Offset/EndDate.
GSV(1,2,"M","3/Wk7") Returns the number of times you did not take at least 3 samples in any week Sun-Sat Week with an ending Saturday in the month.
GSV(11,1,"R","MWF") Returns the number of times you did not have a value for variable 11 on a Monday, Wednesday, and Friday in the report date range.
GSV(1,I3,J4,3) Sets the sampling requirement of 3 for variable 1 for the dates specified in cells I3 and J4. If there is 1 value between the dates specified, function will return 2, if there is 3 or more values function will return zero (0).
See Also: GNOS to count the number of samples and NDM to count the number of certain weekdays in a month.