Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

suvechha_b
Contributor II

How can I show the current month name ?

Hi All ,

My Qliksense model got SET vMaxUWMonth=Max([UW_MONTH_KEY]); which is the maximum month. How to show the name of the Month as 'April 2019;

Current Month - UW_ MONTH_KEY = 201910

Current Month Name - 'April 2019;

Please see below ;

Sample model attached.

 

CurrentMonthName.PNG

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: How can I show the current month name ?

Well, in that case, try like:

=Date(AddMonths(Date#($(vMaxUWMonth), 'YYYYMM'), -6), 'MMMM YYYY')
11 Replies
Mauritz_SA
Contributor III

Re: How can I show the current month name ?

Hi there

Try Date($(vMaxUWMonth),'MMMM YYYY'). That should give April 2019.

Good luck.

Mauritz

Channa
Valued Contributor III

Re: How can I show the current month name ?

try date(date,'MMMYYYY')

Channa
suvechha_b
Contributor II

Re: How can I show the current month name ?

My  variable  '$(vMaxUWMonth)' is not a date field it the  YearMonth i.e 201910 . Max(UW_MONTH_KEY) is '201910' which is 'April 2019'.

Mauritz_SA
Contributor III

Re: How can I show the current month name ?

Hi there

Can you please explain how 201910 is April 2019? To me is would seem that it should be October 2019 if it is in a YYYYMM format?

Regards,

Mauritz

MVP
MVP

Re: How can I show the current month name ?

Do you have the understanding if - 201910 is 'April 2019', how 201809 becomes 'August 2018' ? If you don't have the understanding, why don't you just use the field UW_MONTH_NAME itself?

suvechha_b
Contributor II

Re: How can I show the current month name ?

Hi ,

I am using Fiscal Year Month

So for Fiscal Year 2019 it is starting for 

Jul 2018     which is  201901

Aug 2018   which is  201902

Sep 2018     which is  201903

Oct 2018   which is  201904

Nov 2018     which is  201905

Dec 2018   which is  201906

Jan 2019     which is  201907

Feb 2019   which is  201908

Mar2019     which is  201909

Apr 2019  which is  201910

May 2019     which is  201911

Jun 2019  which is  201912

rogerpegler
Contributor

Re: How can I show the current month name ?

Assuming:

201910 means 10th month in year ended 30 june 2019; and

a data model where month_key and month_name are linked (I couldn't load the qvf for security reasons)

then what about

maxstring({<UW_ MONTH_KEY= {"$(=max(UW_ MONTH_KEY)>} UW_ MONTH_NAME)

suvechha_b
Contributor II

Re: How can I show the current month name ?

Hi , it wont work if not selected UW_MONTH_KEY from where I am getting the MAX(UW_MONTH_KEY ) as its a integer value but I do MAX(UW_MONTH_NAME) as it contains such as 'April 2019' ?

I am using Fiscal Year Month

So for Fiscal Year 2019 it is starting for 

Jul 2018     which is  201901

Aug 2018   which is  201902

Sep 2018     which is  201903

Oct 2018   which is  201904

Nov 2018     which is  201905

Dec 2018   which is  201906

Jan 2019     which is  201907

Feb 2019   which is  201908

Mar2019     which is  201909

Apr 2019  which is  201910

May 2019     which is  201911

Jun 2019  which is  201912

MVP
MVP

Re: How can I show the current month name ?

Well, in that case, try like:

=Date(AddMonths(Date#($(vMaxUWMonth), 'YYYYMM'), -6), 'MMMM YYYY')