Hello Appsheet Community,
I’m trying to do a complicated COUNT() function and would appreciate any help.
Context: My app allows nurses to log visits to sites. Sites are located in various boroughs and have different site types. I’m working on created a summary page for managerial staff.
Three tables involved:
- nurseLog: This is the form where nurses enter information about their visit.
- Caseload: This is a list of sites. Rows in this table have a one:many relationship with nurseLog. Nurses log many visits at each individual site. Rows in caseload also have lots of location information for each site.
- sumByBorough: This is where I’m trying to compile some summary statistics on the visits. I’m using this sheet as the fodder for some charts.
Goal: I am trying to make a table that shows the total number of nurseLog rows that are related to sites in specific boroughs. The borough information is stored in the Caseload table.
To accomplish this I tried making a virtual column in sumByBorough. But I’m having trouble. I think I want to create a virtual column in sumByBorough that is a count of rows in nurseLog that are related to a row in Caseload Builder that has a value in column Borough equal to the value in column borough in sumByBorough.
Then again, maybe there is another solution all together. Any help would be appreciated. Thank you!