Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

chipmunkG
New 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
Highlighted
MVP
MVP

Re: how to sort the listing have value with string and text

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 

7 Replies

Re: how to sort the listing have value with string and text

You want this in script? Or front end?

Life is so rich, and we need to respect to the life !!!
santhiqlik
Contributor

Re: how to sort the listing have value with string and text

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
New Contributor III

Re: how to sort the listing have value with string and text

 
Highlighted
MVP
MVP

Re: how to sort the listing have value with string and text

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 

chipmunkG
New Contributor

Re: how to sort the listing have value with string and text

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
New Contributor

Re: how to sort the listing have value with string and text

front end. display like img below.

Capture2.PNG

chipmunkG
New Contributor

Re: how to sort the listing have value with string and text

thank you. that's great!