Home : GCC
Q11318 - INFO: GCC
GCC returns the count of values that meet the condition specified by Condition and Limit.

SYNTAX:

GCC(VarNum,GroupOffset/StartDate,Grouping/EndDate, Condition, Limit, Consecutive_Count,  optional Count_Type) 

VarNum:  The variable number to get the total 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:

"D" Days
“M” Monthly 
"R" Report Dates
Click here for available Grouping options

Condition: Valid Settings are: "<", "<=", "=", "<>", ">", ">=", "DETECTED","NOT DETECTED"

Limit: Value to compare cell values to.

Consecutive_Count: The number of values in a row that MUST meet the condition.

Count_Type: Optional.  Set to 0 (default if not specified) to count every time n (consecutive count) values in a row meet the condition.  Set to 1 to count 1 every time the condition is met, but do not keep counting if the conditon continues to be met.  Set to 2 to count every time and only count if there are no time gaps between readings. Set to 3 to count 1 everytime condition is met and only count when there are no gaps. See Examples.

 

EXAMPLES:

  

GCC(108,1,"D",">",.5,2) Returns 5.  Count the number of values for day ("D") one (offset of 1) of the report  where variable 108 is greater than .5 (Limit) two consecutive times in a row.

GCC(108,1,"D",">",.5,2,1) Returns 2.  Count the number of values for day ("D") one (offset of 1) of the report  where variable 108 is greater than .5 (Limit) two consecutive times in a row.  The Count Type set to 1 means each time the condition is met, the value must return to normal before additional values will be counted.

GCC(108,2,"M","<", 1,1) Counts the number of values for the 2nd (offset of 2) month ("M")  of the report  where variable 108 is less than 1 (Limit)

GCC(109,1,"D",">.5,2,2) Returns 2. Counts the number of values for the day ("D")  where variable 109 is greater than .5 two consecutive times in a row  only when there are no gaps between readings.

GCC(109,1,"D",">.5,2,3) Returns 1.  Counts 1 evrytime condition is met but does not continue counting because condion has been met.

 

 

GCC(4011,1,"R","DETECTED",0.5,1) - Counts the number of values that are detected (i.e. values that are ND or < are NOT counted). Note the Limit, Consecutive_Count and Count Type are ignored when the condition is set to DETECTED or NOT DETECTED.

GCC(4011,1,"R","NOT DETECTED",0.5,1) - Counts the number of values that are not detected (i.e. values that are ND or < are counted). Note the Limit, Consecutive_Count and Count Type are ignored when the condition is set to DETECTED or NOT DETECTED.

Date Value
1/1/2024 <1 GCC(4011,1,"R","DETECTED",0.5,1) = 3
1/8/2024 ND
1/14/2024 3 GCC(4011,1,"R","NOT DETECTED",0.5,1) = 2
1/21/2024 44
1/28/2024 >50

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 6/4/2008 4:54 PM.
Last Modified on 4/22/2024 9:33 AM.
Last Modified by Scott Dorner.
Article has been viewed 2402 times.
Rated 8 out of 10 based on 1 vote.
Print Article
Email Article