I would like to know how to SUM up all the [...

I would like to know how to

SUM up all the [Points] from the same person based on [PersonID]?

Example: Table Person has a full list of information for all the people. It has a column named [Points]. I would like this column [Points] to SUM/show all the points that belong to a person. The points can be found in another table for each event this person attended.

Table Event has the points listed based on [Person ID]. One [PersonID] can be found in multiple rows and each row represents the event he attended.

Example: [PersonID] is 1234 and [Points] 10 [PersonID] is 1122 and [Points] 10 [PersonID] is 2132 and [Points] 10 [PersonID] is 1234 and [Points] 10 [PersonID] is 1234 and [Points] 10

So [PersonID] 1234 has a total of 30 [Points] and I would like this 30 points shwo on the other table.

Does my explanation make sense to you? Thank you.

0 6 381
6 REPLIES 6

Assuming that you have two tables with colums - โ€œPersonโ€; idPerson, PersonName, Surname, etcโ€ฆ - โ€œEventsโ€; idEvent, idPerson, EventName, Points, etcโ€ฆ

You may create a virtual column (may be named as [Total Points]) in your โ€œPersonโ€ table with a formula; SUM(SELECT(Event[Points],[idPerson]=[_THISROW].[idPerson]))

@Yilmaz_Kandis1 It shows me this: The โ€˜SUMโ€™ function requires a list of numeric inputs

@Russey_Novell My bad. let me regenerate my App. I think it might be that problem.

@Yilmaz_Kandis1 It worked. Thank you. I just need to adjust a few things and it is working now with your expression. Thanks a lot.

May I ask are you using a related table structure?

@Aleksi_Alkio I am new to AppSheet and I am not quite sure what is โ€œrelated table structureโ€ means. Could you please give me an example of related table structure? Thanks.

Top Labels in this Space