Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting Problem

Hi,

I have a data like below

Date(DownDays)

01/04/2016()

01/14/2016(0.3)

01/14/2016(7.5)

01/21/2016(5.4)

i want asc order with the downdays ....

Result

01/14/2016(0.3)

01/21/2016(5.4)

01/14/2016(7.5)

01/14/2016()

Labels (1)
7 Replies
sunny_talwar
MVP
MVP

Where are you trying to sort this? Do you have a sample you can share?

swuehl
Champion III
Champion III

I would suggest that you separate the two values into two fields, maybe like

LOAD

     Date#(Left(YourField, 10),'MM/DD/YYYY') as Date,

     Num#(Textbetween(YourField,'(',')')) as Down,

     ...

Then you should be able to sort by Down wherever you want.

Not applicable
Author

is it work in sorting - exp?

can you please share script, textbetween you are using, is it qv function?

swuehl
Champion III
Champion III

Well, I've just shared a script, kind of, haven't I?

And yes, Textbetween() is a QV function. Just hit F1 in the desktop client and search:

TextBetween(s , beforetext , aftertext [, n ])

Returns the text between the n:th occurrence of beforetext and the immediately following occurrence of aftertext within the string s.

sunny_talwar
MVP
MVP

It is a QlikView and Qlik Sense question if that's what you are asking.

Not applicable
Author

I am using Qlik Sense.

sunny_talwar
MVP
MVP

TextBetween will work in Qlik Sense as well. Where exactly are you trying to do this sorting? Can you share a sample?