Skip to main content
Question

Formulated Calculations

  • January 12, 2022
  • 0 replies
  • 65 views

Hello,

I am trying to build an "assessment" application that takes different grades and calculates overall scores. The issue I am currently having is that lets say I have three numeric fields that are 1-10, and a score field that takes the aforementioned three fields and sums them and then averages. How would I go about creating a calculation where if one of the grades were not applicable, it would average the other two without needing the N/A field to complete the calculation?

------------------------------
Michael Martin
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • January 12, 2022
Try this
Average(
IF([Field 1]<>"N/A", [Field 1 score]),
IF([Field 2]<>"N/A", [Field 2 score]), 
IF([Field 3]<>"N/A", [Field 3 score]))


That will only average the non null values, so if field 1  = "N/A" it would be omitted from the Average.

if you also need the sum


IF([Field 1]<>"N/A", [Field 1 score],0)
+
IF([Field 2]<>"N/A", [Field 2 score],0)
+ 
IF([Field 3]<>"N/A", [Field 3 score],0)




------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------