SQL subquery (SELECT * FROM table WHERE x IN (SELECT....) )
First of all I would test the SQL query.
That should work normally but maybe there is an issue to the variable replacement in the query.
Therefore I would run a Debugger and when the step is on the query, I read the generated query in the middle window. There you should see the exact query Qlikview is trying to run and check if the variable value is well replaced in it.