Survey Solutions

Support portal and knowledge base

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

roster attributes from multiple select question

Andres Arau Jan 08, 2018 06:04PM EST

Dear support team.

We've been trying to the get attributes from roster elements (hhroster) that are selected in a multiple select question linked to that roster. To be more espefic:

- We have a roster of household members
- In a second roster (bank accounts roster), we ask to multiple select those household members who are account holders (this var is named accnme)
-From that multiple select, we want to know how many are women (memsex is asked in hhroster)

Following the example of burgers in a public questionnaire, we have been trying the following without success:

accnme.Count(x=>hhroster[x].sex==2)

We appreciate your support in advanced

Andres

Up 0 rated Down
Sergiy Radyakin Jan 08, 2018 07:07PM EST Survey Solutions Agent

Andres,

.Count() is applicable to a roster, not to an individual question.
As I understand you want to ask:
“AMONG THE HOUSEHOLD MEMBERS, HOW MANY ARE WOMEN AND SELECTED IN ACCNME?”

This is:
hhroster.Count(p=>p.sex==2 && accnme.Contains(p.@rowcode))
or a variation of that depending how the accnme is linked to the list or to a question in the roster.

Best, Sergiy Radyakin

Up 0 rated Down
Martina Jan 10, 2018 05:29AM EST
Dear Sergiy,

We have tried your proposed solution but it would not work because accnme does not exist in the context of hhroster.

1) hhroster contains information such as memage, memsex...

2) accroster is a roster of bank accounts. For each account in the household, we collect information such as:
- banknme (name of bank)
- acctype (type of bank account)
- accnme --> multiple select question linked to household roster. We select ALL the household members that are account holders. We would like to know how many of these account holders (per account) are women. Alternatively, we could also try to investigate how many women in the household are account holders (of any of the accounts in accroster).

Thank you very much, hope this clarifies

Up 0 rated Down
Sergiy Radyakin Jan 11, 2018 03:56PM EST Survey Solutions Agent

Dear Martina,

I have created an illustration of my method in the section “Disability” of the “Public example User questions and common patterns”. It does correctly display the number of males, females, and children that have a disability, which is being an account holder in your example. If your questionnaire asks account ownership per account (thank you for the clarification) then the MCQ on ownership and variable for tallying the members should also be part of the roster on accounts.

The second question “how many women are account holders (of any of the accounts)” is then more difficult than the first one (which is separate by account) since one can’t simply add up the numbers due to possibility of duplication. Applying the same strategy, you calculate the status for every member, whether (s)he is an account holder, just like I calculate status isPetOwner in another example “Pets ownership” of the same questionnaire. Please study this example.

I have added a subsection of different tallies based on the household members dimension and pets dimension. The key idea is to try to work with the roster containing the items which you want to count, and treat every item as having or not having an attribute that is of interest to you. That you include in the definition of some calculated variable of the corresponding data level.

Best, Sergiy Radyakin

Up 0 rated Down
Sergiy Radyakin Jan 15, 2018 08:08PM EST Survey Solutions Agent

Dear Andres, Martina,

have you had a chance of checking the “Disability” and “Pet ownership” examples? Is any of the techniques used in them suitable for your case?

Best, Sergiy

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
support@mysurvey.solutions
http://assets2.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete