**GLCSS(Offset/StartDate,Grouping/EndDate, Stat,VarNum1,..VarNum99)**

or

**GLCSS(Offset/StartDate,Grouping/EndDate, Stat,"Where Clause")**

**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 availiable Grouping options

**Stat: **The statistic/summary to calculate in quotes:

- Sampled - Samples Collected, i.e. a sample status of Received, Analyzed, or Closed.
- SampledNoResult - Samples collected with no result for any one variable specified, i.e. status of Received.
- Due - Samples not yet collected/received.
- Analyzed - Number of results
- Closed - Number of closed samples
- Skipped - Number of Skipped

**VarNum1..VarNum99:** A comma separated list of variables that sets which variables to calculate from.

**Where clause** Instead of providing a list of variables, you can use an SQL Where clause against the VarDesc,Location table to get the list of variables. I.E. “Units = 'mg/L'” wound return all variables with Units set to mg/L. See Examples.