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: 
arixooo123
Creator III
Creator III

how to sort the order of values in a list box manually

hello dears,

I have a list box including the Shamsi Months ( Months in Persian), 

I tested all of the sort options (state,expressions,frequency...) but it does not get sorted as i wanted it to be.

I want to order them as it is in calender, apparently i have to sort them manually. but how?

thank you tabcalendar.png

23 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Go to chart properties, --> Sort --> use expression for sorting and use the below expression.

=Match([Shamsi Month,'فروردین','اردیبهشت','Mar in arabic','','')

make sure to use all Arabic month names.

by the way there was no data attached.

Regards

ASHFAQ

arixooo123
Creator III
Creator III
Author

they are not Arabic Months, by the way, i tried that as the first effort. doesn't work

ashfaq_haseeb
Champion III
Champion III

Hi,

sharing sample qvw file with data and expected output would be worth.

Regards

ASHFAQ

arixooo123
Creator III
Creator III
Author

check again, the attached file is there!

thanks

ashfaq_haseeb
Champion III
Champion III

Hi,

I have downloaded it. But its corrupted, I cannot open it.

Can you attached another version that i can open.

Regards

ASHFAQ

arixooo123
Creator III
Creator III
Author

My expected output is instead of the picture shown in the first question, months should have this order: from right to left

فروردین--اردیبهشت--خرداد--تیر--مرداد--شهریور--مهر--آبان--آذر--دی--بهمن--اسفند

ashfaq_haseeb
Champion III
Champion III

Hi,

Look at the attached image and QlikView file.

Hope it helped.

Regards

ASHFAQ

arixooo123
Creator III
Creator III
Author

try this one :

arixooo123
Creator III
Creator III
Author

that's all correct.. but i cannot open your qvd file, since i'm using the personal edition. if you tell me what you wrote in the expression part, i would be grateful

ashfaq_haseeb
Champion III
Champion III

Hi,

Create a new qvw file and use the below script

load * Inline

[

Month,Year,Amount

فروردین,2013,500

اردیبهشت,2013,500

خرداد,2013,500

تیر,2013,500

مرداد,2013,500

شهریور,2013,500

مهر,2013,500

آبان,2013,500

آذر,2013,500

دی,2013,500

بهمن,2013,500

اسفند,2013,500

فروردین,2014,500

اردیبهشت,2014,600

خرداد,2014,600

تیر,2014,600

مرداد,2014,600

شهریور,2014,600

مهر,2014,600

آبان,2014,600

آذر,2014,600

دی,2014,600

بهمن,2014,600

اسفند,2014,600

]

Save and reload

Now drop your Month Field list box to your front end application.

Right click on month properties sort tab --> Select load order reversed.

Look at capture.jpg image attached.

Or

use the below expression to sort

=Match(Month,'اسفند','بهمن','دی','آذر','آبان','مهر','شهریور','مرداد','تیر','خرداد','اردیبهشت','فروردین') 

Create bar chart with month as dimension and sum(Amount) as expression

Again go to chart properties --> sort tab of chat--> Select load order reversed.

Or

use the below expression to sort

=Match(Month,'اسفند','بهمن','دی','آذر','آبان','مهر','شهریور','مرداد','تیر','خرداد','اردیبهشت','فروردین') 

Look at  final output capture1.jpg

Regards

ASHFAQ