# How to sum the price of items?

**URL:** <https://community.thunkable.com/t/how-to-sum-the-price-of-items/3828581>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, help\
**Created:** [May 14, 2025, 12:47pm UTC](https://community.thunkable.com/t/how-to-sum-the-price-of-items/3828581 "2025-05-14T12:47:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuropija2020w23lwe](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kuropija2020w23lwe](https://community.thunkable.com/u/kuropija2020w23lwe)\
**Post date:** [May 14, 2025, 12:47pm UTC](https://community.thunkable.com/t/how-to-sum-the-price-of-items/3828581/1 "2025-05-14T12:47:34Z")

</div>

![Screenshot 2025-05-14 204556](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5f40263d6ca76b3e5b97629372b31f33bf48344d.png)  
 ![Screenshot 2025-05-14 204532](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5f205be4ea168707bbb5d6badfa1644ab8fe3885.png)

I still got the total spent 0

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 14, 2025, 2:16pm UTC](https://community.thunkable.com/t/how-to-sum-the-price-of-items/3828581/2 "2025-05-14T14:16:57Z")

</div>

There are several problems with your blocks:

1. You are wanting to add **text** to a list but you’ve added a **list** to the list each time you create a row. You need to remove the block that says `+ list -`.
2. You have a `for each item` loop without a list specified. You left that blank. You need to put `app variable itemList` there.
3. Text and numbers are different and cannot be directly compared or used in the same way. I don’t know if rounding a text string such as “15.8” will produce what you want (16). It may just fail. But I do know that you can convert a text string to a number by adding 0 to it using a math block.

---

<div class="post-metadata">

**Author:** ![kuropija2020w23lwe](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kuropija2020w23lwe](https://community.thunkable.com/u/kuropija2020w23lwe)\
**Post date:** [May 14, 2025, 11:09pm UTC](https://community.thunkable.com/t/how-to-sum-the-price-of-items/3828581/3 "2025-05-14T23:09:44Z")

</div>

![Screenshot 2025-05-15 070845](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/8/982b0f8e485c86128ac7c9a8954c5f03de320e3b.png)

I got Total Amount Spent : NaN

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 15, 2025, 4:42am UTC](https://community.thunkable.com/t/how-to-sum-the-price-of-items/3828581/4 "2025-05-15T04:42:28Z")

</div>

Your blocks look correct to me. Could you share a link to your project? I can probably find the problem faster that way.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 15, 2025, 4:47am UTC](https://community.thunkable.com/t/how-to-sum-the-price-of-items/3828581/5 "2025-05-15T04:47:08Z")

</div>

I don’t often use ChatGPT for Thunkable issues but this was helpful:

> **[ChatGPT - Fixing totalAmountSpent calculation](https://chatgpt.com/share/68257199-b81c-8003-a0c2-fe3a41f271f0)**
>
> Shared via ChatGPT

---

<div class="post-metadata">

**Author:** ![kuropija2020w23lwe](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@kuropija2020w23lwe](https://community.thunkable.com/u/kuropija2020w23lwe)\
**Post date:** [May 15, 2025, 4:48am UTC](https://community.thunkable.com/t/how-to-sum-the-price-of-items/3828581/6 "2025-05-15T04:48:03Z")

</div>

> **[Thunkable](https://x.thunkable.com/copy/2fd2a0aae6018e72e637e4a0ef42031e)**

here you go ,  
for the total amount spent i already solve by creating another google sheet just for Total amount ( a bit weird T\_T)

But the problem i confuse now are delete items (the total amount spent didn’t update when i delete the item)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [August 13, 2025, 4:48am UTC](https://community.thunkable.com/t/how-to-sum-the-price-of-items/3828581/7 "2025-08-13T04:48:43Z")

</div>

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