Hi,
I'm wondering if it's possible to use the Maximum and Minimum functions with select_multiple questions
I've got a series of answers with numerical equivalents, and I'd like to find the maximum or minimum value answer to use for future equations.
E.g. I want to find the minimum "size" chosen using the following questions:
| Type | Name | Label | Calculation |
|---|
| select_multiple size_list | sizes | Available Sizes | |
| decimal | minimum_size | Minimum Available Size | min(${sizes}) |
| list_name | name | label |
|---|
| size_list | 1 | Small |
| size_list | 2 | Medium |
| size_list | 3 | Large |
The calculation I tried only works if one choice is selected:
min(${sizes})
I'm able to find the minimum with cascading if statements, but it's pretty tedious and depends on the order the values are written:
if(selected(${sizes},'1'),1,if(selected(${sizes},'2'),2,if(selected(${sizes},'3'),3,0)))
Is there a better way to accomplish this?
Thanks