Calculated field to sum record counts from multiple custom fields | Community
Skip to main content
Level 3
July 15, 2025
Solved

Calculated field to sum record counts from multiple custom fields

  • July 15, 2025
  • 2 replies
  • 843 views

I would like to create a report that will show the sum of record counts for multiple fields in a custom form. Specifically, something like this: If Field A or Field B = Choice 1, then show the total count of Field 1 plus Field 2. If Field A or Field B = Choice 2, show the total count of Field 3 plus Field 4, and so on. I'm terrible anything except the very simplest calculated fields. Is this something can can be done, and if so, can you give me the actual text to do it? Thanks for any help!!!

Best answer by skyehansen

1) people are always going to have to fill out field A and B 
No. Field A would be required, but field B is optional.

 

2) However, fields 1-8 only appear based on the field A and B answers.
Correct

 

3) still hazy on this one. You really just want an overall count over a number of tasks.

e.g.

task 1 = Field A / Choice 1 and Field B / Choice 2 means 1x1.1 and 1x1.2

task 2 = Field A / Choice 1 and Field B / Choice 1 means 1x1.1 and 1x2.1

Total 1.1's = 2

Total 1.2's = 1

Total 2.1's = 1
Yes, I want an over count over a selection of tasks, however Task 1 Field A/Choice 1 then gives them the option of 1.1, 1.2, 1.3, etc. You're missing a step in there. Likewise with Field B.

This might be easier to explain if I give you the actual text rather than generic letters and numbers. I'll follow up with a new spreadsheet.


hi Darcy,

 

I don't think I'm missing a step. I'm using one example, where in this example:

* for one task, you may have chosen 1.1 and 1.2, and

* for a second task you may have chosen 1.1 and 2.1.

 

It doesn't mean there aren't other options. It just means I chose the options that I chose, for the two example tasks in order to provide you with an overall total count of choices you selected. I would have said the same thing below -- Task 1: Acute Care / Hospital 1, Acute Care / Hospital 2

Task 2:. Acute Care / Hospital 1, Clinical Service Lines / Behavioral Health

This would lead to 2 counts of hospital 1, 1 count of hospital 2, 1 count of behavioral health. Which I mentioned, I don't know that you can get this kind of count from a report.

 

The point in the original response being that you're looking to sum over a number of tasks -- and this kind of "aggregation" (sum of several tasks) -- as far as I can tell -- can only be done as a "grouping". I don't see a way for that to happen. I can certainly give you in a task report, task by task, "x number of 1.1, y number of 2.4" and so on, but then I don't see how to sum that count over ten tasks without the benefit of pulling them out into excel. (sorry to get repetitive here; I hope that you get the idea though)

 

If Scott has a different option that works for you, please feel free to go in that direction.

2 replies

skyehansen
Community Advisor and Adobe Champion
July 15, 2025

a couple of questions come to mind, and might help you be a bit more prescriptive about your plans.

 

1) what does a "total count" entail? (what are you counting in fields 1-4? or do you just mean these are all number fields, and a total count just means "field 1 + field 2"?)

2) what if field A = choice 1 and field B = choice 2? Would that involve adding all four fields?

DarcySm1Author
Level 3
July 15, 2025

1) I want a total record count of the selections from Field 1 plus Field 2 (or 3 and 4)
2) No, I only want the results of like choices in A and B. If A and B are different choices, it would only count the one choice.

Not sure if that explains it clearly. 

DarcySm1Author
Level 3
July 15, 2025

Here is a visual that might help. What I'm looking for is a record count of each like answer from Field 1+2, Field 3+4, etc.

kautuk_sahni
Community Manager
Community Manager
July 29, 2025

@darcysm1 Just checking in — were you able to resolve your issue? We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!

Kautuk Sahni