Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ndeeleysww
Not applicable

Last Month as just month Name


Hi,

I'm setting some variables in my load script to bring back month names:

SET tThisMonth = Month(Today());

SET tLastMonth = Month(Today())-1;

However, whilst the first variable returns Apr, the second returns 3. I need this variable to be just the month name, as the data I am evaluating has the amount in one column and the month name for that amount in the next. I've tried MonthName but this also returns the year.

Any help gratefully received!

Cheers

Neil

Tags (2)
1 Solution

Accepted Solutions
Not applicable

Re: Last Month as just month Name

Try this..

Month( AddMonths(Today(),-1))

5 Replies
jsanchezh
Not applicable

Re: Last Month as just month Name

Maybe you can try this

month(month(today())-1)

Kind Regards

Not applicable

Re: Last Month as just month Name

Try this..

Month( AddMonths(Today(),-1))

ndeeleysww
Not applicable

Re: Last Month as just month Name

That worked! Thank you.

ndeeleysww
Not applicable

Re: Last Month as just month Name

Sorry - that just returned Jan

anuragprasad
Not applicable

Re: Last Month as just month Name

You can also try :

Date(Addmonths(today(), -1), 'MMM') for Month name or

Date(Addmonths(today(), -1), 'MMM-YY') for MonthYear