calculate # of records that have a specific value

  • 0
  • 1
  • Question
  • Updated 7 months ago
  • Answered
I'm trying to calculate the number of records that share a specific value, and I want this number to appear in each record. For example if 5 out of 10 records have value x in field y, I want every record with value x to show the number 5. 

Does anyone know how to do this easily? I'm looking at the API_GetNumRecords, but I'm not sure how to deploy it. 
Photo of QB Development

QB Development

  • 330 Points 250 badge 2x thumb

Posted 7 months ago

  • 0
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb

If you have a parent table related to the table in question, you can set up a custom summary field in the parent that summarizes the number of child records where [y] = "x". I'm taking you literally. You will have an easier time of doing what you want this way. Then, you can pass the value back into the child table as a lookup field.