Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
sspawar88
Creator II
Creator II

Sorting for MonthYear

Hi,

I'm Having Dimension MonthYear in Which Values are like Feb2015, Mar2015, Feb2016, April 2016.

How can i sort them in Bar chart ?

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Satish,

You can order it by Expression, if you have a date associated: =Max({1} Date).

Regards!

View solution in original post

8 Replies
Anonymous
Not applicable

Hi Satish,

You can order it by Expression, if you have a date associated: =Max({1} Date).

Regards!

tamilarasu
Champion
Champion

You can use below sort expression

=Date(Date#(MonthYear,'MMMYYYY'))

MayilVahanan

Hi

If you don't have any date column, try like below

LOAD MonthName(Date#(Month, 'MMMYYYY')) as Month Inline

[

Month

Feb2015,

Mar2015,

Feb2016,

Apr2016

];

And then sort by Numeric Value in Sort Tab

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jonathandienst
Partner - Champion III
Partner - Champion III

If MonthYear is a valid QV date numeric, then sort numerically.

If MonthYear is a string, change your load so that it is converted into a date type.

     LOAD

          ...

          Date#(MonthYear, 'MMMyyyy') as MonthYear,

          ...

and then sort numerically.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
susovan
Partner - Specialist
Partner - Specialist

Hi Satish,

Try this17.JPG

Warm Regards,
Susovan
Chanty4u
MVP
MVP

hi

Create your Month_Year field as a date in the script: Date(MonthStart(MyDate),'YYYYMMM') as Month_Year. Then sort it by Numeric Value in the chart.


chk similar thread


RE:Bar Sort order

maksim_senin
Partner - Creator III
Partner - Creator III

Hi,

Also it's usefull to use Dual() function. Please refer to QV reference.

Best regards,

Maxim

ziadm
Specialist
Specialist

Load

Dual(Date(MonthStart(DateField),'YYYYMMM') ,DateField) as MonthYear