Multiple Check Boxes Calculation to get % Complete

  • 0
  • 1
  • Question
  • Updated 7 months ago
  • Answered
I have five check boxes that represent different phases of a construction project. Each check box is worth some of a total number of hours to complete the project. I want to create a field that calculates the % complete of the project based on which check boxes are checked. For example, if all five check boxes are worth 20% of the hours, if one is checked I want to indicate that we're 20% complete. If three are checked I want the field to show we're 60% complete. I know how to do this with five extra fields but assume there has to be a way to do the full calculation in one big formula field.
Photo of Lee Gilmore

Lee Gilmore

  • 82 Points 75 badge 2x thumb
  • unsure

Posted 7 months ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,006 Points 50k badge 2x thumb
Here is a compact formula for a formula numeric field set to display in percent.

count([cb 1], [cb 2], [cb 3], [cb 4], [cb 5])/5
Photo of Lee Gilmore

Lee Gilmore

  • 82 Points 75 badge 2x thumb
Thanks for the suggestion. I probably should have used a more complicated example to properly illustrate my end goal. A colleague explained the following example. It was over my head at first but both your suggestion and this example are much better than my initial, many field approach. Thanks again!

var Number Phase1 = If([Phase 1],0.15,0);
var Number Phase2 = If([Phase 2],0.55,0);
var Number Phase3 = If([Phase 3],0.30,0);

$Phase1+$Phase2+$Phase3