SUM Command

The SUM command generates summary statistical animal data matching your command conditions, and presents the following details in a table or graph format:

The graph view is flexible and may be adjusted on the fly:

Additionally, each of the table columns allows for sorting to quickly customize your data view.

Use the SUM command to assist you with a variety of tasks, including the following examples:

SUM command syntax is spelled out using the examples below: 

IMPORTANT: SUM commands require that the BY or DOWNBY keyword is presented before the FOR keyword.



Command (required): DairyComp command.


Switch(es): control the results returned by modifying or limiting the command to specific data. The following switches are supported for SUM in the current Platform release: 




Includes results for both live and dead animals. Without the switch, command results include live animals only.


Limits results to dead cows only.


Sets the standard deviation calculation to use sample values. Without the switch, Platform calculates population standard deviation.


Includes zero values in averages and standard deviation calculations. Without the switch, average, standard deviation, mode, and median calculations include non-zero values only.



SUM items: Items to display as averages in the table and/or graph. For instance, DIM MILK. An unlimited number of SUM items may be included in a Platform command, and up to seven items are supported in DairyComp 305.

After the command is run, SUM items are selectable as drop-downs on the Command Results page: 

For a complete listing of standard items, see DairyComp Standard Items. Because items are customizable in DairyComp, your dairy may have additional items. View the Item Definitions for all items available for your dairy.


SUM item modifiers: Modifiers may be used to pull specific data points. Available SUM item modifiers: 




VarianceClosedA measure of how far each value in the data set is from the mean.


Standard deviation


ModeClosedThe value that appears most often in a set of data.


MedianClosedThe value separating the higher half from the lower half of a data set.







For instance, MILK:98 MILK:99 provides the minimum and maximum milk data.


Group By item(s): Controls the animal groupings. For instance, BYPEN LACT groups the results by PEN and LACT and displays them in ascending order.

Both Platform and DairyComp 305 support up to two Group By items at a time.

After the command is run, the Group By items are selectable in the By drop-down on the Command Results page. The drop-down includes animal counts in each group: 

Group By items support two sort types: 

Sort Type



Ascending sort (low to high, A - Z, or earliest to latest)


Descending sort (high to low, Z - A, latest to earliest)


Condition filter: Filter for the command. Available filter: FOR.


Conditional item(s): Item conditions that must be matched to be included in the results. The following conditional operators may be used:


Definition for numeric and date values

Definition for string values


equal to

equal to


not equal to

not equal to


greater than



greater than or equal to



less than

does not contain


less than or equal to