Re: Set analytics inside IF statement does not reflect identifier.
Usually variables are used in a dollar expansion: $(vToDate). But I can't say from just what you posted what's wrong. I have no idea how you defined your variables. Do the separate count expressions work? Perhaps you can post a small qlikview document that illustrates the problem.