Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable in Set Analysis

Guys,

I have a variable as follows:

vCurMonth=num(Month(Today()))

I want to use this variable within my expression in the table:

Sum({<Months={$(vCurMonth)}>}Allocations)

But it's not working.

Any ideas?

Labels (1)
2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Is your Months field numeric? The variable definition needs a leading = sign (in Variable Overview). So vCurMonth should be:

     =Month(Today())

     or

     =Num(Month(Today())

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi,

It works perfectly in calculated dimension, but this variable isnt working in Set Analysis in expression. I guess, there's no problem with formats