Calculation depending on previous selection

How would the calculation be if i have a relevant question and it needs to be calculated depending on the previous selection as in the following test.
test (5).xls (42 KB)

Do you also use repeat group? because I can't see it in your example.
You can just use ${q2} in your calculation or coalesce(${q2},0) if you want to return 0 when it's not relevant.

No not in repeat groups
Just in relevant question
I wanted to know how the calculation would be

its not clear to me from your XLSForm what the score it trying to calculate its result from (eg just the select-one service value?). Can you perhaps explain a bit further?