Hello Denny,
1st option is if your data source is BW then sort it on Query level and used this query directly in Design Studio thorugh OLAP Connection.
2nd options is if it is not BW data source , and array is defined manually in Design Studio then you can use <arrayname>.sort function in java script (syntax you can get through google search).
3rd, if above two option is not worked then provide more details to achieve your requirement.
Regards,
Dhaval