Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

zhaohaifeng
New Contributor III

Variable for Month

Hello everyone,

please help to explain the case below. Thanks in advance.

For variable V_MAXMONTH,  We define Let V_MAXMONTH=Month(TODAY()) in data load, my confuse was that  we  cant calculte $(V_MAXMONTH) in TEXT box, and also how to use the month variable in set analysis. Thanks in advance.


Best Regards,

Haifeng

Tags (1)
1 Solution

Accepted Solutions
agigliotti
Honored Contributor II

Re: Variable for Month

try as below:

Let V_MAXMONTH = Month(TODAY());


in your textbox use only the variable name without $ expansion.


set analysis example:

sum( {< your_month_field = {"$(V_MAXMONTH)"} >} your_measure )


I hope this helps.

3 Replies
gianpaolo_31
New Contributor III

Re: Variable for Month

One workaround is to create the variable in the Variables section in the Edit Sheet.

ChennaiahNallani
Contributor III

Re: Variable for Month

Try like below.

in script

Let vMaxMonth = Month(Today());

Expresion

=vMaxMonth

agigliotti
Honored Contributor II

Re: Variable for Month

try as below:

Let V_MAXMONTH = Month(TODAY());


in your textbox use only the variable name without $ expansion.


set analysis example:

sum( {< your_month_field = {"$(V_MAXMONTH)"} >} your_measure )


I hope this helps.

Community Browser