Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ReddyQsQv
Contributor II
Contributor II

Sorting order in Qliksense- Straight table

Value ID Status
Test1 1 Green
Test2 1 Amber
Test3 1 Amber
Test1 2 Green
Test2 2 Amber
Test3 2 Red

My Data is like above , In which the status should be sorted in the order of  Red--->Amber--->Green

The result should shown like below:

Value ID Status
Test3 2 Red
Test2 2 Amber
Test3 1 Amber
Test2 1 Amber
Test1 2 Green
Test1 1 Green

 

 

Labels (3)
6 Replies
joseto00
Contributor II
Contributor II

Hello! You have to assign a number to each color and use this assignment in the order

 

     = if (Status ='Red',1, if (Status ='Amber',2,if (Status ='Green',3)))Short.png

Sameer9585
Creator II
Creator II

In properties panel,goto sorting section and in it select  the feild 'Status' and in sort by expression and write as below

pick(match(Status,Red,Amber,Green),1,2,3)

and select 'ascending'

this helps.

ReddyQsQv
Contributor II
Contributor II
Author

Its not working

Sameer9585
Creator II
Creator II

I want to see how you entered the expression can you please share screen shot or the qvf file if possible

ReddyQsQv
Contributor II
Contributor II
Author

 
Sameer9585
Creator II
Creator II

Hi @ReddyQsQv ,

You should bring the 'status' to criteria '1' and give the expression as this   pick(match(Status,'Red','Amber','Green','N/A'),1,2,3,4)

 

I'm attaching the qvf file check it.

Thanks,