You could do it as outlined in the image shared below.
In the survey tab of your xlsform:
Data entry screen as seen in Enketo: when all the variables are filled
Data entry screen as seen in Enketo: when some of the variables are missing
Reference xlsform:
Maximum.xlsx (9.7 KB)