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

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?

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