Hello,
For our questionnaire’s income section, we use a roster for income sources
Example of multiselect list source question:
Variable name - IncomeSource
1 Income from salaries
2 Income from own enterprise
3 Rental Income from land lease
4 Pensions from employer
Roster ID - IncomeSourceList
Roster: Personal Income - %rostertitle%
Variable name - Q1 (cat.single-sel.)
Has John Doe received payments from %rostertitle%, in the past 12 months?
- Yes
- No
Variable name - Q2 (numeric)
If Yes, what was John Doe’s total %rostertitle% received, in the past 12 months?
Variable name - Q3 (cat.single-sel.)
How often did John Doe receive %rostertitle%, in the past 12 months?
- Daily
- Weekly
- Every two weeks/fortnightly
- Monthly
- Quarterly
- Yearly
Were, for instance, a respondent to select
*‘Income From salaries’, and
*‘Pensions from employer’
in the multi-sel. source question (IncomeSource), the roster questions would look like so:
Personal Income - Income From salaries
Q1 (cat.single-sel.)
Has John Doe received payments from Income From salaries, in the past 12 months?
- Yes
- No
Q2 (numeric)
If Yes, what was John Doe’s total Income From salaries received, in the past 12 months?
Q3 (cat.single-sel.)
How often did John Doe receive Income From salaries, in the past 12 months?
- Daily
- Weekly
- Every two weeks/fortnightly
- Monthly
- Quarterly
- Yearly
Personal Income - Pensions from employer
Q1 (cat.single-sel.)
Has John Doe received payments from Pensions from employer, in the past 12 months?
- Yes
- No
Q2 (numeric)
If Yes, what was John Doe’s total Pensions from employer received, in the past 12 months?
Q3 (cat.single-sel.)
How often did John Doe receive Pensions from employer, in the past 12 months?
- Daily
- Weekly
- Every two weeks/fortnightly
- Monthly
- Quarterly
- Yearly
Still within the IncomeSourceList roster, we’d need to perform a calculation whose output changes based on which what they select in Q3.
For instance, going with the same selections of
*‘Income from salaries’, and
*‘Pensions from employer’
For ‘Income from salaries’, were they to give the amount 100 in Q2 and select Daily in Q3, the variable would calculate
Q2365 = 100365 = 36,500.
whilst for ‘Pensions from employer’, were they to give the amount 4000 in Q2 and select Quarterly in Q3, the variable would instead calculate
Q24 = 40004 = 16,000
and so on for the other Q3 selections
Weekly: Q252
Fortnightly: Q227
Monthly: Q212
Yearly: Q21
The reason we’d like them all to be contained within the same variable that dynamically switches the calculation based on the Q3 selection, is because, outside of the roster, I would like to perform the following calculation to sum all instances of that variable within the roster:
Variable name: total_income
IncomeSourceList.Sum(x=>x.CalculationVariable)