Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to do

Hi ,

i have a list box or filer where i need to sorted. could some one please help on this?

10 Replies
Not applicable
Author

suggestions

maleksafa
Specialist
Specialist

since this is a text, what you can do it to add an extra column in your excel, which is the actual rank (1,2,3 etc...) or transform the text into numbers (for example 500K will be 500 000 in this column), then load these two fields as dual(firstcol,secondcl), the first column being the text and the second one the rank, then you will be able to sort this listbox by numeric value.

Not applicable
Author

thanks for the reply as in my original requirement i need to show only one filter i,e with 5-10k, 10k-30k so on..

and also could you provide me sample to use the expression?

danieloberbilli
Specialist II
Specialist II

Or do the sorting in Excel (re-arrange the cells/values) and in your listbox sorting tab check Load order

Not applicable
Author

Thanks Danile for the suggestions

i really want to know the option in QV not into excel.

can you suggest me in QV?

danieloberbilli
Specialist II
Specialist II

As Malek suggested you could use Dual() - but this requires a new field in Excel as well.

dual(Rank, Rank_number)      // where Rank_number would be your new numeric field in Excel

so you could use Rank later for numeric sorting

When I load dimensions, I always prepare them in my desired sorting order - if its in Excel or in a inline table.

There is no easier or better way in Qlik

Not applicable
Author

ok thanks

my concern is: how to transform the data like 10k = 10,000 in qv?

danieloberbilli
Specialist II
Specialist II

If you are looking for a Qlik-only solution, you could use a Mapping with an inline table as reference or use an If-clause e.g. if(Rank='10-19K', 6), if(...   ))))) as Rank_number    -but this would be too much and unnecessary work for this kind of problem  

danieloberbilli
Specialist II
Specialist II

In your case first you have to consider that for Qlik these values are nothing but text strings. I would not recommend to try now something overcomplicated like creating new fields using Subfield() to seperate the start and end value, then to use some Replace() function for 'K'..its not worthy the effort. As these are labels and they might easily be changed by the business, I would not create any complex function here