“How can I add totals, subtotals, and counts for monthly stats to Analytics reports?”
We can add totals, subtotals, and other counts to the report table by working with Column Properties & Compound Layout in Alma Analytics.
Here is an example showing a total number of loans for the past month with subtotals for daily loans and a count of unique items that were borrowed.
![Number of loans by date for past month with totals and subtotals](https://www.orbiscascade.org/wp-content/uploads/2021/09/image2.png)
On This Page
Steps for adding grand totals
- From the “Results” tab, select the Edit icon on “Compound Layout” page
- Go to “Columns and Measures”, select the Sigma (Σ) icon
- Choose “After”
- Click “Done”
A grand total is added to the end of the report.
![Results tab with arrow pointing at Edit icon](https://www.orbiscascade.org/wp-content/uploads/2021/09/image3-1024x425.png)
![Editing Compound Layout with arrows indicating Columns and Measures, the Sigma icon, and the After option.](https://www.orbiscascade.org/wp-content/uploads/2021/09/image1-1024x355.png)
Steps for adding subtotals
- Select “Loan Date” on the Editing from ” Compound Layout” page
- Click the Sigma (Σ) icon and choose “After”
- Click “Done”
A subtotal for daily loans is added at the end of each date.
NOTE: We could change the default label to “Subtotal” in the “Loan Date” column in this case if desired.
- Click the Sigma (Σ) icon and select “Format Labels”
- Type Subtotal in the Caption field on the Edit Format page
- Click “Done”
![Editing Compound Layout with arrows indicating Loan Date, the Sigma icon, and the After option.](https://www.orbiscascade.org/wp-content/uploads/2021/09/image6-1024x410.png)
![Editing Compound Layout with arrows indicating the Format Labels option and Subtotal caption.](https://www.orbiscascade.org/wp-content/uploads/2021/09/image5-1024x617.png)
Steps for adding a unique count
We can add a total to a non-numeric field such as MMS IDs for this example to get a count of unique values for each MMS ID. Do this by applying “COUNT DISTINCT.”
- Select “MMS id” on the Editing from “Compound Layout” page
- Click the Gear symbol for “MMS id” and select ” Aggregation Rule”
- Choose “Count Distinct”
- Click “Done”
A total count of distinct values is added to see how many unique items were borrowed for the loan period.
![Editing Compound Layout with arrows indicating the MMS ID column, the gear symbol, the Aggregation Rule option, and the Count Distinct option.](https://www.orbiscascade.org/wp-content/uploads/2021/09/image8-1024x431.png)
Resources
Video demonstration: Analytics: Totals, Subtotals, and Counts (5:37)
Article from Ex Libris: Adding Totals and Subtotals to Analytics Report Tables