Hi everyone,
Actually I have two questions:
First, how can I name the images captured in a repeat, based on the answer of previous question?
For example, I have a question named (siteID) answered as (ST01), can I name the captured images of the repeat, based on that question (ST01_1, ST01_2..., etc).
Second, is there a way to retrieve the number of answered questions in the group to be used in getting the average?
For example, I have 5 questions in a group, the answer of the fifth is the average (${Q1}+${Q2}+${Q3}+${Q4}) div 4. The issue is that one question may be N/A, means that the average will be div 3. So, I would need to divide by the number of the answered questions.
James Tedrick I'd apreciate your feedback
Thanks in advance
Solved! Go to Solution.
Hi Ahmed,
I had a quick look at your survey and the questions used for Ecosystems_Services_Score, and I think the easiest way to work out the average is to do a count in a hidden and/or null field, and then use that for the average. For example:
Add a new field called Ecosystems_Services_Count
with the following calculation:
if(${E1}=0,0,1) + if(${E2}=0,0,1) + if(${E3}=0,0,1) + if(${E4}=0,0,1) + if(${E5}=0,0,1) + if(${E6}=0,0,1)
And then modify Ecosystems_Services_Score
with following calculation:
(int(${E1})+int(${E2})+int(${E3})+int(${E4})+int(${E5})+int(${E6})) div ${Ecosystems_Services_Count}
Example xlsx file attached. You can do the same to all the other groups that have similar count and average calculations required. Hope this helps.
Phil.
Hi Ahmed,
To answer your first question, this is not currently possible. We have an open enhancement request for this, however it is still in our backlog. See more info on the post I replied to yesterday: https://community.esri.com/thread/237720-can-i-use-a-response-value-from-a-previous-question-for-a-n...
As for your second question, yes this is possible however you will need to use a nested if statement and possibly some hidden questions to store which values have answers and which do not, and use those to flag which values and the total count should be used in your average calculation. If you can share your xlsx file we can take a closer look and provide some guidance if you are still stuck in working it out.
Phil.
Hi Philip,
Thank you very much, actually yes I'm still working on it. Attached is my xlsx file. The whole groups are quite similar. For example, the group called (Ecosystems), you can find the calculation of the question (Ecosystems_Services_Score) is as follows:
(int(${E1})+int(${E2})+int(${E3})+int(${E4})+int(${E5})+int(${E6})) div 6
I divided by the number of questions (6), however some may be answered as N/A choice (e.g. two of them). Meaning that I would need it to be (div 4).
Hi Ahmed,
I had a quick look at your survey and the questions used for Ecosystems_Services_Score, and I think the easiest way to work out the average is to do a count in a hidden and/or null field, and then use that for the average. For example:
Add a new field called Ecosystems_Services_Count
with the following calculation:
if(${E1}=0,0,1) + if(${E2}=0,0,1) + if(${E3}=0,0,1) + if(${E4}=0,0,1) + if(${E5}=0,0,1) + if(${E6}=0,0,1)
And then modify Ecosystems_Services_Score
with following calculation:
(int(${E1})+int(${E2})+int(${E3})+int(${E4})+int(${E5})+int(${E6})) div ${Ecosystems_Services_Count}
Example xlsx file attached. You can do the same to all the other groups that have similar count and average calculations required. Hope this helps.
Phil.
Hello Philip,
Thank you very much, this calculation has done exactly what I needed to do.
I really appreciate your help