Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Feb 22, 2022 07:14 AM
I would like to keep a total score in a separate field based on certain values in 1 to 10 fields. So let’s say:
Field 1: Yes
Field 2: No
Field 3: Yes
Field 4: No
Field 5: Yes
Field 6: Yes
Field 7: No
Field 8: Yes
Field 9: Yes
Field 10: Yes
Then a summarized 7 must be placed in the final number field. 7x yes = 7 and if I change field 3 to no after 2 weeks in the database, then field must become final grade 6 without having to do this manually.
Is this possible and if yes how? I read about rollup/formula fields but how to do this on these 10 examples fields? It should be all present in 1 table and not different tables.
Solved! Go to Solution.
Feb 22, 2022 03:39 PM
That’s quite easy
1st way:
({Field 1}=‘Yes’)+({Field 2}=‘Yes’)+({Field 3}=‘Yes’)…
2st way ( if you are sure it’s ‘Yes’ or ‘No’ and nothing else)
LEN(
CONCATENATE({Field 1},{Field 2}…{Field 10})
)-20
Feb 22, 2022 08:37 AM
Rollup is the right way but if you share a screenshot of the base, we can see how to incorporate it where you want.
Feb 22, 2022 08:44 AM
The quick and dirty way would be a formula field with the following:
IF({Field 1}="Yes",1,0)+
IF({Field 2}="Yes",1,0)+
IF({Field 3}="Yes",1,0)+
...
There’s no equivalent to Excel’s SUMPRODUCT (since you can’t construct an array on the fly), so this is also the easiest to maintain when you need to add or subtract fields in the calculation.
Note that if you use a checkbox field for those fields (instead of Yes/No), you can just add them (i.e. {Field 1}+{Field 2}+...
), because the value of checkbox fields is 1 for checked and 0 for unchecked.
Feb 22, 2022 03:39 PM
That’s quite easy
1st way:
({Field 1}=‘Yes’)+({Field 2}=‘Yes’)+({Field 3}=‘Yes’)…
2st way ( if you are sure it’s ‘Yes’ or ‘No’ and nothing else)
LEN(
CONCATENATE({Field 1},{Field 2}…{Field 10})
)-20
Feb 23, 2022 01:54 AM
WOW you made my day! I used the formula field this way and it works exactly as what I tried to do.
THANK YOU!