---
title: SUM Command
slug: help/en-us/pulse/sum-command
docTags: 
createdAt: 2026-02-09T13:09:03.796Z
---

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.

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/M40zR4slGCrFoT4w8wgNr_sum-example8n.png" size="24" width="1170" height="948" darkWidth="1170" darkHeight="948" position="flex-start" showCaption="false"}

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

`SUM MILK PCTF PCTS LGSCC BY lact PEN FOR LACT>0`'

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/yJaMKD5gs5XUKqSTrsW28_sum-example7n.png" size="18" width="976" height="910" position="flex-start" showCaption="false"}
:::

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

`SUM \Z TKET BY LCTGP FOR FDAT>-365`

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/F1cNXDCXcYIfk635Ey44H_sum-examplewswitchn.png" size="18" width="953" height="1000" position="flex-start" showCaption="false"}

:::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

`SUM MILK DIM BY LACT FOR LACT>0`

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/uDrck9fn9vWxTcgQ4eNMI_sum-example3n.png" size="20" width="962" height="1003" position="flex-start" showCaption="false"}
:::

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

`SUM BY AGE FOR LACT=0`

::Image[]{src="https://api.archbee.com/api/optimize/3h8pSJcGUXEi4HGCCYPTA/zY42Tk7v2Bi2qijBSIrUX_sum-example2n.png" size="24" width="1046" height="746" position="flex-start" showCaption="false"}
:::

:::ExpandableHeading
## Related Topics

- [Command Reference Guide](docId\:TmoNO0nLWnpf4e3UV7zLb)
- [Reports/Worklists Results](docId\:AGLFBf-bfmbCntpJdR-W3)
:::

