Having a calculated variable as index of a roster

Dear SS,

I have the following set of questions:
q1 how many bedrooms do you have in the dwelling? (numeric)
q2 how many living rooms do you have in the dwelling? (numeric)
variable x=q1+q2 (calculated variable)

Then I want a roster to run through x times. Is this possible? I cannot see that among the source questions for the number of rows - I guess bc SS does not allow calculated fields to be a roster index?

Thanks,
Emanuele

Hi @emass1991,

A list cannot be enabled by a calculated variable, but you can use a fixed list and write an enable condition to display items in the range 0 through q1 + q2, like this example:

The Fixed Set of Items roster will work, but you have to set it up with the absolute maximum possible number of items.
Another way would be to insert a dummy numeric question:

Enter total no. of rooms (%x%)
(i.e. %q2% livingrooms + %q1% bedrooms)

with a validation condition: x == q1 + q2

Then point your roster to this numeric question. I don’t say that this is elegant, but it will work for any number of bed and living rooms.

Thanks Klaus; yeas, I’ve used a confirmation question as you suggested and that worked.