Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Syntactical Gymnastics… (incrementing variable reference)

I'm getting pretty adept at this set analysis business, but I'm having an issue defining a particular set.

I have a variable called 'CmpYear'; I use this variable in my sets just fine: {'$(CmpYear)'}

What does the set look like for CmpYear + 1? I've tried several different things, not really having a lot of success.

Thanks a ton!

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

This? Seems to work for a completely unrelated variable and data in the application I'm currently fiddling with.

{'$(=$(CmpYear)+1)'}

View solution in original post

3 Replies
johnw
Champion III
Champion III

This? Seems to work for a completely unrelated variable and data in the application I'm currently fiddling with.

{'$(=$(CmpYear)+1)'}

Not applicable
Author

Exactly the insanity I was looking for.

So-called 'dollar sign expansion', and the dollar sign convention in set analysis make me very, very confused. Plus, all the wacky braces, brackets, quotes, et all.

johnw
Champion III
Champion III

Yeah, I'm not particularly happy with QlikView using $ to mean three separate things, particularly when they can all occur together in rather short expressions:

sum({$<Year={'$(=$(CmpYear)+1)'}>} Value)

At least we can remove the first $ from the expression above since it's the default. I always do so to try to reduce some of the $ confusion. But the two remaining $ can still be confusing enough. And it's not like set analysis syntax needed any help being confusing.