I believe that what you’re looking for isn’t happening like you expect is because of one little thing: CommCare functions and statements can sometimes get touchy if they are expecting a value and you don’t pass one to it. for example, you’re trying to add values that are numeric together, but, when you don’t have an actual value to sum, sometimes it causes commcare to not be able to recognize if it’s a “0” value, or a “Zero” value, or a “0.0” value, or any of the possible data objects that can carry a “Zero”.
So what do we do?
You have the following options:
1- use the function called coalesc. (https://confluence.dimagi.com/display/commcarepublic/CommCare+Functions#CommCareFunctions-coalesce) so basically you can say : coalesce(Q2, 0) + coalesce(Q3, 0) + …
the coalesce function will try to find a value in Q2, if it finds one, it’ll use it, if it doesn’t, it’ll use the next argument, which in this example is “0”. this way, you know that you will always have a integer value to add up even if the questions aren’t answered.
2- use the function “Sum()” found here (https://confluence.dimagi.com/display/commcarepublic/CommCare+Functions#CommCareFunctions-sum). The complication here is that the function “Sum” will only take a nodeset. a node set is essentially a collection of data structures linked together by a a parent data structure. But to avoid confusion, think of it as a series of the same question grouped together. so, if you change the way you’re asking the group of questions to something that will allow you to ask the same question a number of times and collect the answers (for example, “How do you make an income” and then “How much income do you make” repeated for X number of times) you can fund out how much everybody makes if you use the function "Sum(“How much income do you make”). for this example, depending on what Q1-X are, you may or may not be able to use it.
whatever happens, the first option i described should do the trick. but it won’t make the formula any more friendly to type.