Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
chipmunkG
Contributor
Contributor

how to sort the listing have value with string and text

Hi,

I have issue on sort listing that have value with string and  text for example;

1.0m, 2.0m, 4.0m,8.0m, 10.0 m, others,218k, 512k.

I want the listing to sort like 

218k

512k

1.0m

2.0m

4.0m

8.0m

10.0m

others

 

 

 

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

You may try using sort by expression :

If(Index(Value, 'm'),Purgechar(Value,'m')*1000000,
	If(Index(Value, 'k'),Purgechar(Value,'k')*1000, 10e10))

Capture.JPG 

View solution in original post

7 Replies
Anil_Babu_Samineni

You want this in script? Or front end?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
santhiqlik
Creator
Creator

Hi,

I would suggest to assign numeric values for that text that needs to be sorted. This can be done by creating a separate field based on the values in the text field. 

Use this numeric field in Expression in Sort tab in front end. 

fallenangel6
Creator
Creator

 
tresesco
MVP
MVP

You may try using sort by expression :

If(Index(Value, 'm'),Purgechar(Value,'m')*1000000,
	If(Index(Value, 'k'),Purgechar(Value,'k')*1000, 10e10))

Capture.JPG 

View solution in original post

chipmunkG
Contributor
Contributor
Author

hi, already try this code but i got result like below which is only number display. how do i display the listing that i want.?

Capture1.PNG

chipmunkG
Contributor
Contributor
Author

front end. display like img below.

Capture2.PNG

chipmunkG
Contributor
Contributor
Author

thank you. that's great!