Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

variable issue

Dear all,

i need your support in order to create a variable.

I try to explain: I turned a date into this format YYYYMM using this script

LET VPath_xx     =     num(year(today())*100+month(today())) and it works fine.

Now i would like to create another variable but subtracting 12 months from the current date.

The final result should be something like this : 201710



Could you please give me some suggestion ?

Thanks in advance for your support

have a nice day

Mauro

Tags (2)
3 Replies
Highlighted
Specialist II
Specialist II

Re: variable issue

Hi Mauro,

Try this:

=date(addmonths(today(),-10),'YYYYMM')

G.

Highlighted
Contributor III
Contributor III

Re: variable issue

Great!

it works fine

Thank you

Mauro

Highlighted
Partner
Partner

Re: variable issue

let's try as below:

LET VVar2     =     num(year(addmonths(today(), -12))*100+month(addmonths(today(), -12)));


I hope it helps.