Filter in query var

I have fixed it. The issue is not in the query but rather my code which i dont remember anymore. you can close the thread or delete it, thanks