Calculated value is not being shown in downloaded data

Hello,
While filling the form during a survey, a calculation is being performed and result value is displayed. However this calculated value is not displayed in downloaded data.

Following is the image of form during survey. Here calculated value is seen.

Following image shows the data in submitted form. The same value is showing as “Nan” in this data

Requesting support in resolving this.
Thanks and regards,
Mandar

@mandarsathe, could you also share us a screenshot of your DATA>Table for the same?

@Kal_Lam , Do you mean the table of downloaded data? Here it is. Please also let me know if you meant something else

Could you share with us the section of your xlsform that holds this question, calculation and the note that holds the calculated result? Maybe we could have a look at it.

aTiyiKxnUpszmKY6LoeJLe (1).xlsx (19.7 KB)
Attached is a xlsform with the relevant section. “Calculate” with issue is shaded in yellow.
Again, the calculated value is being displayed in the survey form but is not being displayed in the downloaded data.

Try using the coalesce, as outlined in the post discussed previously. It should solve your issue.

@Kal_Lam , coalesce worked. Thanks a lot.

I still have a question though. As mentioned in original question, the calculation was being performed in the survey form during the survey (without coalesce). The result was visible in the survey form (image attached in opening post). But it did not appear in the downloaded data. Why does this happen?

The coalesce function helps to convert the empty values to zero thus making a calculation possible.

Yes I get the functionality of coalesce now. But my question now is different.

Why the calculated value was being displayed in the survey form but not in the downloaded data.

In other form earlier, I faced the problems with empty values, where the result of the calculation was neither visible in the survey form nor in downloaded data. But in current form it was visible in survey form and not visible in downloaded data.

Maybe you will have to have a closer look at the _id where this is happening.

How to do it? can you please guide me?

Check out the _id for those cases that have the issue under the DATA>Table. Then download your data as XLS format and then check the same _id under the XLS format to see if it’s really missing there as well. With this, you should be clear that the calculations are missing at both the level.