Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
venkey2847
Contributor II
Contributor II

Sorting problem

Hi all,

I have a table with fields ID and Emprange

H.  NoEmprange
10 Employees
21-10 Employees
3101-500 Employees
4501-1,000 Employees
511-100 Employees
61,001-5,000 Employees

      

I reloaded and I have taken  Emprange as a filter.

It is not giving an order.

I need to have like below

Emprange

0 Employees

1-10 Employees

11-100 Employees

101-500 Employees

501-1,000 Employees

1,001-5000 Employees

My filter should be like above.

I got it by using Match function and now it is giving like that but if I make a selection it is not giving an order.

Suppose if I select 11-100 Employees, it turns into green colour and it arrives at top like below

Emprange

11-100 Employees

0 Employees

1-10 Employees

1001-5,000 Employees

501-1,000 Employees

100-500 Employees

It is giving like above.

But it should be as it is while selecting filter.

I need like below

Emprange

0 Employees

1-10 Employees

11-100 Employees

101-500 Employees

501-1,000 Employees

1,001-5,000 Employees

How can we achieve???

Please help me out this issue.

Thanks venkey.

5 Replies
sunny_talwar

What is your Match statement? Something like this?

Match(Emprange, .....)?

Try like this instead:

Match(Only({1} Emprange, ....)

marcus_sommer

I would create a new field from them like:

dual(Emprange, [H. No]) as Emprange

and then using a numeric sort-order within the sort-tab and also disabling the sorting to the selection state.

- Marcus

maxgro
MVP
MVP

Load the field Emprange before your data in the order you want,

then load all the other tables

and sort the listbox Emprange by load order original

venkey2847
Contributor II
Contributor II
Author

@sunny,i used only({1} Emprange)

It works fine now but can you please explain me how it works briefly

Thanks alot

sunny_talwar

Without adding {1} you un-selected portion of Enprange becomes null which cannot be used within the Match function. When you add {1}, you ignore all selections and Enprange is always the same value. All I am doing is to ignore selections in your sort expression


Does this make sense?