Hi i have this problem
i have one question that is select_multiple:
Q1- Wich are youre favorite fruits?
The options are:
*** Apple**
*** Banana**
*** Grape**
*** None**
I want to count the number of selected option but if they mark “None” I want this option not to count in the sum
How can i do it?
aFrS492vYBL5tR5FrBWUrs (1).xlsx (11.0 KB)
1 Like
wroos
2
You may use
count-selected(${Q1}) - if( selected(${Q1}, ‘nameOfNoneOption’), 1, 0 )
3 Likes
Kal_Lam
3
@jorgelihber, you could do this as outlined by @wroos above. Here is the breakdown of how it can be done.
In the survey tab of your XLSForm:
In the choices tab of your XLSForm:
![Image 2](//forum-kobotoolbox-org.s3.dualstack.us-east-1.amazonaws.com/original/3X/7/6/76b2a00f73c8b9eee4cca4ee929baea89f19ff80.jpeg)
Data entry screen as seen in Enketo: when nothing is entered
Data entry screen as seen in Enketo: when something is entered but not none
Data entry screen as seen in Enketo: when something is entered along with none
Reference XLSForm:
Count Selected.xlsx (11.4 KB)
2 Likes