# Mathematical formulas in collections

**URL:** <https://community.glideapps.com/t/mathematical-formulas-in-collections/69557>\
**Category:** Ask for Help\
**Created:** [January 14, 2024, 6:46pm UTC](https://community.glideapps.com/t/mathematical-formulas-in-collections/69557 "2024-01-14T18:46:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefania1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stefania1/32/68778_2.png) [@Stefania1](https://community.glideapps.com/u/Stefania1)\
**Post date:** [January 14, 2024, 6:46pm UTC](https://community.glideapps.com/t/mathematical-formulas-in-collections/69557/1 "2024-01-14T18:46:12Z")

</div>

![exemplu](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/c/5c5d894cbb31250ef88baae61e18c0166f9980e3.png)  
Hi,  
Is it possible to add a mathematical formula to the collections to automatically calculate the amount between the initial balance and the final balance? I want my employees to check if their final balance matches the one in the application.that is, after they enter the initial balance and the final balance, their final balance will be automatically calculated.

---

<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:** [January 14, 2024, 7:14pm UTC](https://community.glideapps.com/t/mathematical-formulas-in-collections/69557/2 "2024-01-14T19:14:22Z")

</div>

Yes, it’s really easy when your values are on the same row which looks like they would be base on the form you are showing. It would just be a simple subtraction in a Math column I assume.

---

<div class="post-metadata">

**Author:** ![Stefania1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stefania1/32/68778_2.png) [@Stefania1](https://community.glideapps.com/u/Stefania1)\
**Post date:** [January 14, 2024, 7:21pm UTC](https://community.glideapps.com/t/mathematical-formulas-in-collections/69557/3 "2024-01-14T19:21:13Z")

</div>

I have a math column in data editor, but i need it to be in collection and I don t know how to do that… can you show me pls?

---

<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:** [January 14, 2024, 7:23pm UTC](https://community.glideapps.com/t/mathematical-formulas-in-collections/69557/4 "2024-01-14T19:23:29Z")

</div>

I don’t know what you mean by a collection. You can show the value from a math column in a collection, so I must be missing something.

---

<div class="post-metadata">

**Author:** ![Stefania1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stefania1/32/68778_2.png) [@Stefania1](https://community.glideapps.com/u/Stefania1)\
**Post date:** [January 14, 2024, 7:29pm UTC](https://community.glideapps.com/t/mathematical-formulas-in-collections/69557/5 "2024-01-14T19:29:18Z")

</div>

![Screenshot 2024-01-14 212531](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/2/0234548174fabb1d54b38cce819b8498fef611ae.png)  
In this screenshot you can see that I entered values ​​for the initial balance and the final balance, I want the sum of them to be automatically calculated here (where it says total balance) so that the employee can see it directly when he enters, but I don’t know if it’s possible… .

---

<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:** [January 14, 2024, 7:40pm UTC](https://community.glideapps.com/t/mathematical-formulas-in-collections/69557/6 "2024-01-14T19:40:04Z")

</div>

OK, that looks like a form, not a collection. Also, you weren’t showing the total balance field in your first screenshot and mentioned that you wanted to calculate the final balance…not the total balance. So, I was a little confused by your question.

First of all, can you confirm that the screen you are showing is a Form or an Edit screen? Are you adding a new row or editing an existing row? Does it have Submit/Cancel buttons at the bottom? If it is a form, you can’t perform calculations in real time because the calculations only occur once the row is added to the table. That only happens when you click on Submit. Also, you will not be able to show a computed value in an entry component, because the entry component is meant for user entry…not for displaying computed values…so you would need a regular text component.

If you want to calculate values in a form in real time, you will need to use a custom form, but it will cost you additional updates.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particular…

Screenshots that show the entire screen are a lot more useful that cropped images because there is a lot of sub context that I can obtain from other parts of your screenshot that you may not realize are important.

---

<div class="post-metadata">

**Author:** ![Stefania1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stefania1/32/68778_2.png) [@Stefania1](https://community.glideapps.com/u/Stefania1)\
**Post date:** [January 14, 2024, 7:51pm UTC](https://community.glideapps.com/t/mathematical-formulas-in-collections/69557/7 "2024-01-14T19:51:12Z")

</div>

Thank you, I understand… I’m sorry if I misled you, but I’m new here and still learning. 😅
