mazhar
July 17, 2020, 3:47pm
1
Hi,
I want to match the answer of 1st question with matrix response:
Example: Family size =15
Now in Matrix
Age Group Male Female
0-4 3 2
5-11 4 2
12-17 1 1
18-35 1 1
Now the response of the matrix should be equal to 15 the previous answer how I can do that.
Thanks
mazhar
July 17, 2020, 3:48pm
2
0-4 is age group and 3 represent Male and 2 represents Female
Hi @mazhar ,
Welcome to the community! Would you mind having a look at the post that has been discussed previously (it should solve your issue):
Have a great day!
1 Like
mazhar
July 17, 2020, 4:50pm
4
Hi @Kal_Lam , What I am looking for is to use calculate function in Matrix
1 Like
Hi @mazhar ,
For what you are looking for, I would recommend you look at the discussions below
Hi Kobo Community!
Is there a possibility of using calculate function with matrix questions? I have tried using the label for each row/column of the matrix but it is not recognised when I try use the preview function.
Many thanks,
Stephane
mazhar
July 17, 2020, 6:33pm
6
I want to restrict the matrix value with family size.
1 Like
Hi
Have you tried creating this using the instructions that I had sent earlier? Please do and then send the XLS form that you have created if you have a problem. It is much easier helping you when you have attempted to do it first.
Stephane
1 Like
mazhar
July 17, 2020, 7:10pm
8
Whn I do this I can’t preview my form it gives error. How I can share my XLS with you?
Hi
Send me the error message you are seeing and the XLS form you have created.
mazhar
July 17, 2020, 7:45pm
10
@stephanealoo Sorry system is not allowing me to upload file as new user.
Hi @mazha ,
Can you try uploading now?
Stephane
Hi @mazhar ,
So if this is what you require, you could do it as outlined in the image below:
In the survey tab of your xlsform:
In the settings tab of your xlsform:
Data entry screen as seen in Enketo: (Wrong Entry)
Data entry screen as seen in Enketo: (Correct Entry)
Reference xlsform:
Calculation in a Matrix Question.xlsx (11.5 KB)
Have a great day!
mazhar
July 19, 2020, 3:29pm
13
Hi @Kal_Lam ! Many thanks for the swift response and giving this solution I really liked that. a small problem here is it doesn’t accepts the value greater than family size which is good but it accepts the value less then family size.
Example:
Family Size =30 All M/F in matrix are entered as 14 and validated the form it accepted the value in this case it should not accept the value less then the family size.
Hi @mazhar ,
If this is your requirement, you could do the same as outlined below:
In the survey tab of your xlsform:
In the settings tab of your xlsform:
Data entry screen as seen in Enketo (with a wrong entry)
Reference xlsform:
Calculation in a Matrix Question.xlsx (11.8 KB)
Have a great day!
1 Like