Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get Month Name from Number

Hi,

I have this formula for the report name that uses the most recent month selected as part of the report name.

nb: MonthName is just that the name of the month e.g. Nov-11, when the range July to November are selected the formula:

=

max(total MonthName) & ' YTD Customer Report'

returns "11 YTD Customer Report". I want it to say "Nov YTD Customer Report".

How do I change my formula to get the name of the month not the number

Thanks

Dave





6 Replies
Not applicable
Author

hi, simply do like this.. set your date formate as your way.. example:

SET DateFormat='M/D/YYYY';

we have a method named, Month() . it always takes a date and retuns the month name(first 3 chars: nov) as string. so, here i have used that method and giving a parameter like '11/1/1111'. your max(total MonthName) returns 11 and i given date as 1 and year as 1111. dont bother about date and year values. it only consider the month value. try like this..

=month('max(total MonthName)&'/'&'1'&'/'&'1111') & 'YTD Customer Report'

regards

A'run'Idea

Not applicable
Author

if its not working.. try like this also =month('max(total MonthName)&/&1&/&1111') & 'YTD Customer Report'

regards

A'run'

deepakk
Partner - Specialist III
Partner - Specialist III

hi Davidcoad,

If you have date field then you make it this way. So when ever the user selects the Monthname, you will get the maximum date.

MonthName(Max(Date)).

jonathandienst
Partner - Champion III
Partner - Champion III

Dave

The Max function causes the numeric version of the dual to be used. This might work:

=text(max(total MonthName)) & ' YTD Customer Report'.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

hi.. deepak the monthName function returns.. monthname with year also. so, i think this is not fullfill our requirement..

plz check it once.. dont consider my reply, if am wrong..

regards

A'run'

suniljain
Master
Master

Pls Try Following Method.

=NUM(Month(Date#(MonthName,'MMM')))