---
title: SUM Command
slug: pl-check-links/sum-command
docTags: 
createdAt: 2026-02-23T07:45:23.136Z
---

A SUM report or command generates averages for specific items or animals within certain groups and presents the following details in a table or graph:

- Animal counts
- Average values
- Standard deviation
- Data range details, including minimum and maximum values

The graph view is flexible and can be adjusted on the fly.

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/xMeV2HTVqfd_eEo4SqcX9_sum-example6n.png)![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/YM9opz3r8sgrEj8PYpVlG_sum-example8n.png)

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

See the following SUM command examples:

:::ExpandableHeading
### Get an overview of milk composition and quality by lactation or pen

SUMMILK PCTF PCTS LGSCC BY lact PENFORLACT>0

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/rzYh670znrEQ_2zWF42oe_sum-example7n.png)
:::

::::ExpandableHeading
### Analyze the number of times ketosis was diagnosed by lactation group for all animals that calved in the last year

SUM \Z TKETBYLCTGPFORFDAT>-365

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/CfrEdb-zJUc_Bx7D6ElTM_sum-examplewswitchn.png)

:::hint{type="info"}
**NOTE:&#x20;**&#x54;he use of the \Z switch results in the inclusion of zero values for TKET, which includes all animals, not only those diagnosed with ketosis. Removing the switch only includes animals with TKET values, which leads to higher TKET averages.
:::
::::

:::ExpandableHeading
### Get an overview of milk production by lactation

SUMMILK DIM BY LACTFORLACT>0

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/fHm7RHFOCoGeI_94ijkqm_sum-example3n.png)
:::

:::ExpandableHeading
### Analyze animal inventory and identify animals coming into milking

SUM BYAGEFORLACT=0

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/Vf_Wlf3z1o_cdmAsuCH0A_sum-example2n.png)
:::

:::ExpandableHeading
## Related Topics

- [Command Reference Guide](docId\:hLBNo9ewWKq530HgQtQNN)
- [../DairyComp/ReportsWorklists/ReportWorklistResults.htm](docId\:ccHmaj9YUZYEy8iPIgX5C)[Reports/Worklists Results](docId\:ccHmaj9YUZYEy8iPIgX5C)
:::

[\< Return to command line Overview](docId:8tcICBlLYstevG5-oFMd0)
