Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

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

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Well, in that case, try like:

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

View solution in original post

11 Replies
Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi there

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

Good luck.

Mauritz

Channa
Specialist III
Specialist III

try date(date,'MMMYYYY')

Channa
suvechha_b
Creator III
Creator III
Author

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
Partner - Specialist
Partner - Specialist

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

tresesco
MVP
MVP

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
Creator III
Creator III
Author

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
Creator II
Creator II

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
Creator III
Creator III
Author

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

tresesco
MVP
MVP

Well, in that case, try like:

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