Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
SahrierParvez
Contributor III
Contributor III

Sorting

Hi,

This is my Dimenssion
I want to sort my data with this dimenssion

=if(Aggr(sum(Gross_Sales),Year,Customer)<0,'Negative Sale',
if(Aggr(sum(Gross_Sales),Year,Customer)=0,'0 Sale',
if((Aggr(sum(Gross_Sales),Year,Customer)>0 and Aggr(sum(Gross_Sales),Year,Customer)<=500),'1-500',
if((Aggr(sum(Gross_Sales),Year,Customer)>500 and Aggr(sum(Gross_Sales),Year,Customer)<=1000),'501-1000',
if((Aggr(sum(Gross_Sales),Year,Customer)>1000 and Aggr(sum(Gross_Sales),Year,Customer)<=3000),'1001-3000',
if((Aggr(sum(Gross_Sales),Year,Customer)>3000 and Aggr(sum(Gross_Sales),Year,Customer)<=5000),'3001-5000',
if((Aggr(sum(Gross_Sales),Year,Customer)>5000 and Aggr(sum(Gross_Sales),Year,Customer)<=10000),'5001-10000',
if((Aggr(sum(Gross_Sales),Year,Customer)>10000 and Aggr(sum(Gross_Sales),Year,Customer)<=30000),'10001-30000',
if((Aggr(sum(Gross_Sales),Year,Customer)>30000 and Aggr(sum(Gross_Sales),Year,Customer)<=50000),'30001-50000',
if((Aggr(sum(Gross_Sales),Year,Customer)>50000 and Aggr(sum(Gross_Sales),Year,Customer)<=100000),'50001-100000',
if((Aggr(sum(Gross_Sales),Year,Customer)>100000 and Aggr(sum(Gross_Sales),Year,Customer)<=500000),'100001-500000',
if(Aggr(sum(Gross_Sales),Year,Customer)>500000,'500000+'

))))))))))))

19 Replies
ecolomer
Master II
Master II

Unselected  actual chech and select Load Order

ecolomer
Master II
Master II

sorting1.PNG

 

ecolomer
Master II
Master II

currently, as it stands, it is ordering you alphabetically by the result of the dimension

SahrierParvez
Contributor III
Contributor III

Still it is not working.It is disable still

SahrierParvez
Contributor III
Contributor III

So what can i do for sorting

ecolomer
Master II
Master II

you can write in Expression:

=ValueList('Negative Sale', '0 Sale', '1-500', ....)

SahrierParvez
Contributor III
Contributor III

=ValueList('Negative Sale', '0 Sale', '1-500','501-1000','1001-3000','3001-5000')

it also not working.

not even changing anything

ecolomer
Master II
Master II

you can write the expression of the dimension but with a number in front.
1. Negative Sale
2. 0 Sale
3. 1-500
...

in order to sort by alfatec text

SahrierParvez
Contributor III
Contributor III

Thanks its working but it will be great if you share with me how can i remove the 1. 2. 3. in my front view

Brett_Bleess
Support (Former)
Support (Former)

Review the following Design Blog post:

https://community.qlik.com/t5/Qlik-Design-Blog/The-sortable-Aggr-function-is-finally-here/ba-p/14702...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.