How about —
array real($aScore;0) // for each of 9 field pairs — If([Tbl]Field1_na_b:=false) // if you haven’t checked the n/a box for this scoring field append to array($aScore;[Tbl]Field1_score) End if $average:=average($aScore) > On Sep 10, 2023, at 2:12 PM, Stephane Potvin via 4D_Tech > <[email protected]> wrote: > > Hello all, > > This is likely a simple thing but, being an amateur in 4D, I am hoping > someone can help me with a simple formula. > > My situation: > I audition singers and grade them on up to 9 criteria. > When all 9 criteria are used, the formula is simple: > > v_total:=([Table]Field1+[Table]Field2+[Table]Field3, etc.)/9 > > However, in certain circumstances, I only need to calculate 8, or fewer > criteria. To that end, I added a checkbox named “n/a”. > What I trying to find is a way to calculate only those fields that are not > marked “n/a” > > In other words, as I click “n/a” checkbox, I want the dominator of to be > reduced by 1 each time. > ie” one check: /8, 2 checkbox: /7, etc. > > I hope this makes sense and that someone has a simple solution. > > Thank you, > > Stephane > ********************************************************************** > 4D Internet Users Group (4D iNUG) > New Forum: https://discuss.4D.com > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:[email protected] > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) New Forum: https://discuss.4D.com Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

