# Sum/Count entries in DataSource

**URL:** <https://community.thunkable.com/t/sum-count-entries-in-datasource/2044755>\
**Category:** Questions about Thunkable X\
**Created:** [September 16, 2022, 7:11am UTC](https://community.thunkable.com/t/sum-count-entries-in-datasource/2044755 "2022-09-16T07:11:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksp](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@ksp](https://community.thunkable.com/u/ksp)\
**Post date:** [September 16, 2022, 7:11am UTC](https://community.thunkable.com/t/sum-count-entries-in-datasource/2044755/1 "2022-09-16T07:11:18Z")

</div>

Hi,

The front page of my app needs to display the number of records in my DataSource and a sum of some of the columns.

The individual records should not be displayed. (They are displayed on a different screen).

How is the right way to do it? Should I use a Data\_Viewer to count entries and calculate the sum (and then hide the Data\_Viewer). Or is there a simpler way?

(Sorry if this is described earlier, I couldn’t find a similar topic)

---

<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:** [September 16, 2022, 2:33pm UTC](https://community.thunkable.com/t/sum-count-entries-in-datasource/2044755/2 "2022-09-16T14:33:39Z")

</div>

A Data Source is hidden by default. There is actually no way to “show” a Data Source. You can show data _from_ that Data Source in various ways including labels and Data List/Grid Viewers.

If you want to display the number of records, you can set a label’s text to the `number of rows` block from the Data Source drawer:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/ed75656dc4e39b43a77a33fbc1f589d8b3fb34bf.png)

If you want to sum the values of the cells in a column, you can loop through it and add those values together. I recommend Googling _sum column Thunkable_ to find examples of this.

Neither of those methods require a Data List/Grid Viewer.

---

<div class="post-metadata">

**Author:** ![ksp](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@ksp](https://community.thunkable.com/u/ksp)\
**Post date:** [September 19, 2022, 5:50am UTC](https://community.thunkable.com/t/sum-count-entries-in-datasource/2044755/3 "2022-09-19T05:50:05Z")

</div>

Thanks a lot, it works

---

<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:** [December 18, 2022, 5:50am UTC](https://community.thunkable.com/t/sum-count-entries-in-datasource/2044755/4 "2022-12-18T05:50:10Z")

</div>

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