Sum/Count entries in DataSource

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)

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:

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.

1 Like

Thanks a lot, it works

1 Like

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