Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Partner
Partner

Re: Re: how to rearrange the months in non alphabetical order??

You just need to remove the [] around xbasedelivmonth

Highlighted
MVP & Luminary
MVP & Luminary

Re: how to rearrange the months in non alphabetical order??

Hi,

In script try like this

LOAD

*,

Dual(xbasedelivmonth, Match(xbasedelivmonth, 'JANUARY', 'FEBRUARY', 'MARCH', 'APRIL', 'MAY', 'JUNE', 'JULY', 'AUGUST', 'SEPTEMBER', 'OCTOBER', 'NOVEMBER', 'DECEMBER')) AS Month

FROM DataSource;

Now in Chart/List box Select Numeric in Sort tab.

Hope this helps you.

Regards,

Jagan.

Highlighted
Not applicable

Re: Re: how to rearrange the months in non alphabetical order??

Hi Ruhan,

thanks it worked,but the ranks are shown ,how do I get the month names.

eg: if you see sheet 5 in my file attached file how do I pull the rearranged names?? like in my list box delivery details I want the months to be present in the Jan to Dec order... how to do it??Please help.

Highlighted
sasikanth
Valued Contributor III

Re: Re: how to rearrange the months in non alphabetical order??

Write this in that list box properties-->sort tab-->expression

match(xbasedelivmonth,'JANUARY','FEBRUARY','MARCH','APRIL','MAY','JUNE','JULY','AUGUST','SEPTEMBER','OCTOBER','NOVEMBER','DECEMBER')

Highlighted
Partner
Partner

Re: how to rearrange the months in non alphabetical order??

Highlighted

Re: how to rearrange the months in non alphabetical order??

Ouch!!! It hurts to see that so many people suggest an inline table to solve this problem...

An inline table will work, but it is a clumsy method. It is much better to interpret the month name so that it gets a dual format that automatically gets sorted correctly . Here's how you should do it:

First, make sure that you have the environment variables in the beginning of the script:

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET LongMonthNames= 'JANUARY;FEBRUARY;MARCH;APRIL;MAY;JUNE;JULY;AUGUST;SEPTEMBER;OCTOBER;NOVEMBER;DECEMBER';


Then, you can just use the following to interpret the month names. MMM means short month names, MMMM means long month names.

Month(Date#(Month,'MMMM')) as Month

No inline table is needed.


HIC

Highlighted
Not applicable

Re: Re: how to rearrange the months in non alphabetical order??

Thanks a lot all of you for helping me out.

new learning for me.