Forum Discussion

JohnRoss1's avatar
JohnRoss1
Qrew Member
2 years ago

Summerize Sub-Summerized values from Child Records based on groups

Howdy all.  Does anyone know any tricks to accomplish the following as seen in the attached image?  The child records to this parent come in sets of 3, each one has a field called "Run-Time".  I need to combined the run-time of a set of 3 child records, then I need to summarize those totals up to the parent.  This would give me an average run time per group of 3.



------------------------------
John Ross
------------------------------

  • I'm assuming these fields are numeric, in which case you could create a new field for every triplet and then Sum() the values:

    Field ChildSum_n+1:
    Sum([Child 1], [Child 2], [Child 3])

    Then you can just summarize the ChildSum_n+1 results in a new field:

    Average([ChildSum_0], [ChildSum_1], [ChildSum_2], ...) 

    Makes sense?



    ------------------------------
    Lordsman Burgos
    ------------------------------
    • JohnRoss1's avatar
      JohnRoss1
      Qrew Member

      Hey Lordsman

      When you say to create a new field for every triplet, do you mean the child records?  They could be dozens to hundreds of them so tons of fields doesn't sound like a good idea... haha.  Or, did I misunderstand?



      ------------------------------
      John Ross
      ------------------------------
  • You say that the child records come in sets of three. Are those sets labeled in anyway like

    Set 1

    Set 2

    Set 3

    how would you know which children belong to which subset?



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • JohnRoss1's avatar
      JohnRoss1
      Qrew Member

      Hey Mark, thanks for the reply.

      Ah sorry I forgot to specify that.  Originally I was going to write the RID of the first record of the triplet set into all 3 records with a field called "Group".  So I can identify them, but that's where I became stuck.  I'm open to changing this if needed.



      ------------------------------
      John Ross
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        Are you saying that each triplet member shares a field with the same numeric value?



        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------