Sum formula

I want to know if there is a formula like sumif
I have 62 question in in my form and I want to sum the answers I know how to sum if all of them answered bet I cant sum if some of them not answered (some of the questions has skip logic )

If anyone have a solution I will bi appreciated

Thanks

Hi
I would suggest the following approach to sum all the 62 regardless of their skip condition

(if(${Q1}=’’,0,${Q1))+(if(${Q2}=’’,0,${Q2))+(if(${Q3}=’’,0,${Q3))+…+(if(${Q62}=’’,0,${Q62))

What this does, is that it assigns for every question, a default 0 for all skipped questions and picks the question value when not skipped before summing the up. Hope this helps. Remember to change Q1 etc with the actual question name in your dataset
Stephane

1 Like

Thanks for suggestion it doesn’t work wit my form there is an error

Hi @MohammedNamat,

Try this out:

if(${Q1}=’’,0,${Q1})+if(${Q2}=’’,0,${Q2})+if(${Q3}=’’,0,${Q3})+if(${Q4}=’’,0,${Q4})

Sample:

You will see the same in Enketo as:

As advised by @stephanealoo, please note to change the variable name to what you have it in your survey form.

Have a great day!

1 Like

Hello,
I think, you partly didn’t have the right brackets ${… } - NOT round brackets.
Best regards

1 Like

Hi @MohammedNamat
What I proposed would still work the same way as what @Kal_Lam proposed. However as @wroos mentioned, the problem is that you missed the closing bracket for the variable } and used a ) . This is what is causing the error.
Stephane

1 Like

hi

Thanks for your support dears I fixed my form as you suggested and now its working many thanks to all of you @Kal_Lam @stephanealoo and @wroos