# Generating a total

**URL:** <https://community.glideapps.com/t/generating-a-total/69100>\
**Category:** Ask for Help\
**Created:** [December 29, 2023, 5:54pm UTC](https://community.glideapps.com/t/generating-a-total/69100 "2023-12-29T17:54:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Strickland](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/benjamin_strickland/32/68255_2.png) [@Benjamin\_Strickland](https://community.glideapps.com/u/Benjamin_Strickland)\
**Post date:** [December 29, 2023, 5:54pm UTC](https://community.glideapps.com/t/generating-a-total/69100/1 "2023-12-29T17:54:56Z")

</div>

How can I produce a total, for example, the total amount for a month, using a button, etc?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 29, 2023, 6:04pm UTC](https://community.glideapps.com/t/generating-a-total/69100/2 "2023-12-29T18:04:28Z")

</div>

You can use a Rollup column to create totals. If you want to Rollup filtered data, then you can also apply a Rollup column to an existing relation or query instead of an entire table.

> **[Rollup Column | Glide Docs](https://www.glideapps.com/docs/automation/computed-columns/rollup-column)**
>
> Perform calculations on columns, such as count, average, and sum.

When trying to Rollup a value for a specific month, it’s best to use a math column to convert any dates into an easy numeric value.

This in a math column will give you the year and month joined together.  
`Year(Date)*10^2 +Month(Date)`  
Then you can use that number to create relations.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [January 12, 2024, 4:10am UTC](https://community.glideapps.com/t/generating-a-total/69100/3 "2024-01-12T04:10:00Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
