we have several calculated variables that we will import to SQL database. I have a problem now that when one question is not answered (one of the variables needed for the calculated variable), i get an error instead of 0. This is pretty frequent for multiplication and division variables.
There is probably more than 1 answer to this question.
If the error is issued by your SQL database that doesn’t like missing values for some reason, you can probably avoid the issue by marking these variables “Do not export”. Then you can calculate them if needed already in SQL DB with equivalent expressions.
The problem is, however, more generic, since you will have also questions that are skipped or not answered, so you need to consult your SQL system documentation on the recommendations for storing missing values. Storing 0 instead is not always a good idea. Survey Solutions’ documentation describes Missing values.