If-Condition in Choice-Filter: expression for "if (Q1 was answered)"

Dear community,

In an xls-form I want to put the following condition in the choice filter:
If question a was answered, then don't show a certain option in the choices of question b.

In detail:
The questionaire is designed as followed:
Q1: Main question with 5 Options
Q1.1. Detailed Options for Option 1 in Question 1 (if Q1=1)
Q1.2. Detailed Options for Option 2 in Question 1 (if Q1=2)
Q2: Follow-Up Question to Main Question Q1, based on choices in Q1, Q1.1. and Q1.2.

I used the one list for all questions. In this list, options 1-5 are answer to Q1, options 6-10 are answers to Q1.1. and options 11-15 are answers to Q1.2.
I used a choice filter to limit the apperaing options.

For Q2 I want to show all the answers selected in the previous questions.
However, I would like to exclude Q1=1 and Q1=2, as they are redundant, if they were specified in Q1.1 and Q1.2

I tried the following in the choice filter column:
selected(${Q1}, name) or if(${Q1.1}!=''), name !='1', name) or if(${Q1.2}!=''), name !='2', name)

or as another approach:
selected(${Q1}, name) or if(selected(${Q1.1}, ***), name !='1', name) or if(selected(${Q1.2}, ***), name !='2', name)

*** is supposed to be a place holder for expressing "any" -> what is the correct xpath-expression?
Which expression do I have to put for ***?

See my xls-form attached:
Example Form.xlsx (12.6 KB)

Hi @franziska, Welcome to the ODK forum. We're glad you're here. If you have a moment, please introduce yourself in the welcome thread! Introduce yourself here!

Regarding your issue, for the follow-up question since you want Q1 to be redundant, why don't you leave it out in the choice filter options? See this Example Form two.xlsx (12.5 KB)

Thank you for your reply. I did the introduction...

About your response: maybe I was not clear:
I do want SOME options from Q1 to be shown in Q2, namely option 3-5 IF they were selected. I just want to exclude options 1 and/or options 2, IF they were specified in Q1.1 or Q1.2.

One workaround would be
selected(${Q1},name) and name>2 or selected(${Q1.1},name) or selected(${Q1.2},name)
Example Form_workaround.xlsx (12.5 KB)

This leaves out options 1 and 2 even if selected before.
However, if someone does not specify in Q1.1 or Q1.2 they can't chose general option 1 then in Q2,which would be desirable.
So the showing of option 1 and 2 should depend on the answering of Q1.1 or Q1.2