Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

MVP
MVP

Month number to Month name

It might be more flexible to preserve the numeric format as well.

dual(pick(OrderDate,'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),OrderDate)

Sorting could be done in numeric order, you could subtract months, and so on.

Not applicable

Month number to Month name

Thank you - your solution was perfect!

rotero
Contributor

Re: Month number to Month name

this is what im looking for, a quick fix in case the value of month is in NUMERIC value that is not from a date function. This is common if the source data is in csv or xls file.

Highlighted
MVP & Luminary
MVP & Luminary

Re: Month number to Month name

An easy way to get a proper QV month dual from a month number is:

=month(MakeDate(2000,numericMonthField))

It doesn't matter what year you use in the Makedate() function.

-Rob

Not applicable

Re: Month number to Month name

Begineers can use if codition.

Hear is the code:

When Month is loaded as number only.

if(Month=1,'Jan',

     if(Month=2,'Feb',

          if(Month=3,'Mar',

               if(Month=4,'Apr',

                        if(Month=5,'May',

                              if(Month=6,'June',

                                   if(Month=7,'Jul',

                                        if(Month=8,'Aug',

                                             if(Month=9,'Sep',

                                                  if(Month=10,'Oct',

                                                       if(Month=11,'Nov',

                                                            if(Month=12,'Dec')))))))))))) as Month,

brooksc57
New Contributor III

Re: Month number to Month name

Most of the scripts were for tables.

yours worked perfectly for this instance...of front end variables

For vCursorMonth = (vMonthFrom) to (vMonthTo)

Let vcmm = PICK($(vCursorMonth),'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');

Partner
Partner

Re: Month number to Month name

This works great when you need Month as both numbers and letters, so you can work with both dimensions (ie. [Month] and [MonthNumber]).

Thanks a lot.