GEVENTCNT returns the count of Events (Violation, QC, or Entry Limit) for a Facility.
SYNTAX:
GEVENTCNT(Facility, Offset/StartDate,Grouping/EndDate, EventTypeToCount)
Facility: Facility to query against, specified by it's unique identifier in quotes (e.g. "OPSWWTUTOR")
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
EventTypeToCount: The Event Type in quotes to count. Can be the name of the Event Type (ie "Spill") or you can use the following list as shortcuts to the Violation, QC, or Entry Limit Event Types:
- "VIOL" - Violation Event Types (System_Class=1)
- "QC" - QC Flags (System_Class=2)
- "ENTRY" - Entry Limit Flags (System_Class=3)
EXAMPLES:
=GEVENTCNT("",1,"M","VIOL") - Count of Violation Events that start (or end) in the 1st month of the report date range for the current Facility.
=GEVENTCNT("",1,"M","QC") - Count of QC Events that start (or end) in the 1st month of the report date range for the current Facility.
=GEVENTCNT("",1,"M","ENTRY") - Count of Entry Limit Flag Events that start (or end) in the 1st month of the report date range for the current Facility.
=GEVENTCNT("",1,"R","SPILL") - Count of Spill Events (i.e. Event Type = "Spill") that start (or end) in the 1st month of the report date range for the current Facility.
=GEVENTCNT("OPSWWCOMB",1,"M","VIOL") - Count of Violation Events for the Facility with a unique identifier of OPSWWCOMB.