Best way I was taught to work on these situations is to pull apart your expression into the smallest components and put those into Text Objects to check each component etc. and then put things back together one component at a time, that should help you figure out where things are going wrong, and then finding a solution should likely be easier. You may want to have a look around the Design Blog area potentially, might be something out here that may help too:
That area has over 700 posts from our internal experts and most are how-to related, so should be useful going forward on other things if nothing else, sorry not more direct help here, might help if you could attach a small sample QVW so folks could poke around in more detail on their own.
To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question. I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.