# How to calculate the length of row with specific value in a specific column

**URL:** <https://community.thunkable.com/t/how-to-calculate-the-length-of-row-with-specific-value-in-a-specific-column/321645>\
**Category:** Questions about Thunkable X\
**Created:** [November 15, 2019, 11:54am UTC](https://community.thunkable.com/t/how-to-calculate-the-length-of-row-with-specific-value-in-a-specific-column/321645 "2019-11-15T11:54:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![farhadkubd1](https://avatars.discourse-cdn.com/v4/letter/f/b38774/32.png) [@farhadkubd1](https://community.thunkable.com/u/farhadkubd1)\
**Post date:** [November 15, 2019, 11:54am UTC](https://community.thunkable.com/t/how-to-calculate-the-length-of-row-with-specific-value-in-a-specific-column/321645/1 "2019-11-15T11:54:04Z")

</div>

Hello Brother,  
First take a look at the photo. I want to calculate the length of row containing value 1 in column ‘clm’ (red marked) and also containing value 2.

Could you please help me?

 ![newpb](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/4/6414330d2ed66d5ebcac53f0b6ddcade8f090a60.jpeg)

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [November 15, 2019, 11:58am UTC](https://community.thunkable.com/t/how-to-calculate-the-length-of-row-with-specific-value-in-a-specific-column/321645/2 "2019-11-15T11:58:40Z")

</div>

Hi, @farhadkubd1! 👋

Do you want to calculate the length of the whole Column “clm”?

Thanks! 😊

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 15, 2019, 12:01pm UTC](https://community.thunkable.com/t/how-to-calculate-the-length-of-row-with-specific-value-in-a-specific-column/321645/3 "2019-11-15T12:01:31Z")

</div>

Hello,

What are your difficulties? Can you get all the values from the selected Column? After that, distribute them across the list and use the `sum` block over the list entries.

---

<div class="post-metadata">

**Author:** ![farhadkubd1](https://avatars.discourse-cdn.com/v4/letter/f/b38774/32.png) [@farhadkubd1](https://community.thunkable.com/u/farhadkubd1)\
**Post date:** [November 15, 2019, 12:06pm UTC](https://community.thunkable.com/t/how-to-calculate-the-length-of-row-with-specific-value-in-a-specific-column/321645/4 "2019-11-15T12:06:56Z")

</div>

whole column ‘clm’ but with individual value such on how many rows the ‘clm’ column contains value 1? please view the next photo. i have calculate it succesfully. but now i want to calculate with reference value 1 & 2 in column ‘clm’.

![example](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/5/056ca662f0c0b4234c10d1a923bb649717117475.jpeg)

---

<div class="post-metadata">

**Author:** ![farhadkubd1](https://avatars.discourse-cdn.com/v4/letter/f/b38774/32.png) [@farhadkubd1](https://community.thunkable.com/u/farhadkubd1)\
**Post date:** [November 15, 2019, 12:09pm UTC](https://community.thunkable.com/t/how-to-calculate-the-length-of-row-with-specific-value-in-a-specific-column/321645/5 "2019-11-15T12:09:49Z")

</div>

my difficulties is i cannot calculate the length of rows at ‘clm’ column. such as how many rows contains the value 1 at ‘clm’ column? and so for value 2.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 15, 2019, 12:47pm UTC](https://community.thunkable.com/t/how-to-calculate-the-length-of-row-with-specific-value-in-a-specific-column/321645/6 "2019-11-15T12:47:23Z")

</div>

You need to create a loop over all rows and in this loop do a check, if the cell value is 1, then add it to counter1. If the cell value is 2, then add it to counter2.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/how-to-calculate-the-length-of-row-with-specific-value-in-a-specific-column/321645/7 "2024-11-08T11:46:42Z")

</div>


