Forum Discussion

MichelleCoslet's avatar
MichelleCoslet
Qrew Assistant Captain
10 years ago

Formula to divide column by total

I am trying to add a column to the attached summary table that will show the % of inspections an operator is having compared to total inspections being done.

# of inspections / Total inspections

Since I do not have a field for Total inspections I am not sure how to accomplish this. Is there a way to incorporate Quickbases Total field into a formula?

  • There is not a way to use a Totals field in a formula for calculations.  The only way really is to have another table which will create the totals that you need.  

    For example,

    You make a new table called called Inspections Totals and make exactly 1 record in it.  It will be record ID#1.  Then on the Inspectors Records, you make a field called [Link to Summary Totals]  as a numeric-formula field with a formula of 1.  


    The make a Relationship where 1 Summary Totals record is related to many (in fact all) Inspectors records.  Then do a summary total on that Relationships on Total Inspections.  I assume that you might have different Summary totals fields on the Inspectors table for different time periods such as Last Month, This Month To Date, this YTD etc.  So there would also be different Summary fields on the Summary table. 


    Then do a lookup back down to the Inspectors table and you will be able to get your calculation of the % of inspection that a particular Inspector has done. 
    • ltduranltduran's avatar
      ltduranltduran
      Qrew Cadet
      I followed all of your steps. Once you do the lookup back down to the Inspectors Table, how do you get the %?

      I'd really appreciate the help!
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      Well;, if there is a field on the Inspectors table for their # of inspections, it would just be

      [# inspections] / [Total Inspections]

      and then show that as a % with zero decimals.
    • ltduranltduran's avatar
      ltduranltduran
      Qrew Cadet
      This was a great deal of help, I appreciate it. Do you know if there is anyway to get this Total Inspections # to adjust based on filters you might set in a report. For example, if I only want it to apply to inspections between a particular set of dates. Does this make sense?