Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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()

7 Replies
sunny_talwar

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

swuehl
MVP
MVP

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
MVP
MVP

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

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

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