# How to sum a value in a list data

**URL:** <https://forum.adalo.com/t/how-to-sum-a-value-in-a-list-data/54957>\
**Category:** Database\
**Created:** [March 26, 2025, 2:55am UTC](https://forum.adalo.com/t/how-to-sum-a-value-in-a-list-data/54957 "2025-03-26T02:55:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Ali-Bazzi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/ali-bazzi/32/40359_2.png) [@Ali-Bazzi](https://forum.adalo.com/u/Ali-Bazzi)\
**Post date:** [March 27, 2025, 7:30am UTC](https://forum.adalo.com/t/how-to-sum-a-value-in-a-list-data/54957/4 "2025-03-27T07:30:47Z")

</div>

Thank you for attaching the image. Regarding the formula, in this case, it’s only showing one product pricing. In order to show the total price of a group of products in one collection, please follow these steps:

- Add a collection in the database called (My\_cart orders)
- Add a relationship (One to Many) between the (My\_cart) and (My\_cart orders).
- Add a property in the (My\_cart orders) collection, and call it “Total price”.
- Go to your (Add to cart) button, and add an action to create a (My\_cart order) record, then add the following formula into the new (Total price) property: (Current product price x Quantity).
- Finally, we’ll go to the initial label of your formula, and please add the following calculations: (Logged in user =\> My\_cart =\> My\_cart orders =\> Total price =\> Sum).

Please let me know if you have any questions.  
Thank you!

---

_[View the full topic](https://forum.adalo.com/t/how-to-sum-a-value-in-a-list-data/54957)._
