# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## Syntax question for Month number in set analysis

Hello,

I am having trouble with the syntax in my set analysis.  I am trying to change the top formula to a formula that adjusts for each month as the year progresses.  I need help with the syntax in the bottom formula:

[AEQuota.QuotaMonth]={">=1 <=11"}

[AEQuota.QuotaMonth]={">=1 <=Num(Month(Date((\$(vLastMonthEnd)))))"}

vLastMonthEnd is a variable that returns 2018-11-30, so I'm trying to get to the month number in the formula.

Scott

1 Solution

Accepted Solutions
New Contributor III

## Re: Syntax question for Month number in set analysis

Hello Rob,

I think I figured it out.  I needed to create the variable first, then use it in the syntax.  It now works with the variable that I created:

[AEQuota.QuotaMonth]={">=1 <=\$(vLastMonthNum)"}

Thank you so much for your quick response!  Have a great evening!

3 Replies
MVP & Luminary

## Re: Syntax question for Month number in set analysis

Can you post the definition of vLastMonthEnd?

-Rob

New Contributor III

## Re: Syntax question for Month number in set analysis

Please disregard.  I figured out that I should create the variable first, then use it in my syntax.

Solution works:

[AEQuota.QuotaMonth]={">=1 <=\$(vLastMonthNum)"}

New Contributor III

## Re: Syntax question for Month number in set analysis

Hello Rob,

I think I figured it out.  I needed to create the variable first, then use it in the syntax.  It now works with the variable that I created:

[AEQuota.QuotaMonth]={">=1 <=\$(vLastMonthNum)"}

Thank you so much for your quick response!  Have a great evening!