Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rathnam_qv
Creator
Creator

sorting month names

Hi all,

i have a month field...that is not in a sort order...but ,i want to make it in proper sort order.

can anyone tel me!!!

PFA file

Regards,

Smiley.

10 Replies
Anonymous
Not applicable

this is alphabetical order

do you have a datefield?

if yes, goto sort tab and enter month(yourdatefield) in ascending order

maleksafa
Specialist
Specialist

i can think of two options.

1) in your script, when you are loading the month name use the dual function to add a number to the month name that way you will have for each month the proper month number, for example Jan will have 1 and March will have 3.

then in your chart go to sort tab and sort using numeric asc or desc.

2) go to sort tab in your chart, and under expression sort them using the match function:

match(Month,'Jan','Feb','Mar' ...)

MayilVahanan

Hi

You can try these way:

Create a field in script by using

Num(Month(DateField)) as MonthNum;

Sort tab:

Expression : MonthNum

or

Sort:

Load Order: Ascending

If ur data is load in ascending order like Jan, Feb,....

or

Expression: match(Month,'Jan','Feb','Mar' ...)

Thanks & Regards,
Mayil Vahanan R
rathnam_qv
Creator
Creator
Author

Hi Rudolf,

Thanks for your reply!!

The field MO_SHRT_NM is contains the values as Aug,Sep,Mar,...Dec.

this field i am using as dimention in a combo chart...there i am facing the sorting issue.

Regards,

Smiley.


Anonymous
Not applicable

without knowing more about your app, i would suggest

to use an inline table with

[MO_SHRT_NM, sortnr

Jan, 1

Feb, 2

..

Dec, 12]

which connects to your MO_SHRT_NM and you can use sortnr in the sortfield

MK_QSL
MVP
MVP

Go to Sort Tab....

Expression

Write below

Date#(MO_SHRT_NM,'MMM')

ashfaq_haseeb
Champion III
Champion III

Hi,

Try below for sorting

Dual("Your Month Field",match("Your Month Field" ,'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'))

Regards

ASHFAQ

vinay_hg
Creator III
Creator III

in list box properties, sort it according to expression, i mean in  formatting write the mmm/yyyy format for sorting. so sorting will happen based on the expression written for sort.

rathnam_qv
Creator
Creator
Author

Hi Malek,

canu please give me some example how to use dual function in this situation.

Regards,

Smiley.