Skip to main content
Announcements
See why Qlik was named a Leader in the 2024 Gartner® Magic Quadrant™ for Data Integration Tools for the ninth year in a row: Get the report
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sorting Class() time Interval

Hello Everyone,

How can I sort this expression, I have seen thread for Numeric value but did not find anything for Time Interval..

=time(subfield(Class((T_SEG),(1/24/60)*$(VInput)),' ',1),'hh:mm')

& ' to '

& time(subfield(Class((T_SEG),(1/24/60)*$(VInput)),' ',5),'hh:mm')

Please suggest

1 Solution

Accepted Solutions
marcus_sommer

This don't work?

=dual(

time(subfield(Class((T_SEG),(1/24/60)*$(VInput)),' ',1),'hh:mm')

& ' to '

& time(subfield(Class((T_SEG),(1/24/60)*$(VInput)),' ',5),'hh:mm'),

num(subfield(Class((T_SEG),(1/24/60)*$(VInput)),' ',1)))

- Marcus

View solution in original post

10 Replies
kkkumar82
Specialist III
Specialist III

Hi,

I think you can use the autonumber() for the same expression and use it in the "Sort" tab.

Thanks

Kiran Kumar

sunny_talwar

May be use a dual() function around your current dimension and then use it with a number to do a numeric sort

kkkumar82
Specialist III
Specialist III

Hi ,

This may help you.

https://www.youtube.com/watch?v=X6d6K-pFX_8

Thanks

Kiran Kumar

Anonymous
Not applicable
Author

Autonumber() is a script function not UI function

Anonymous
Not applicable
Author

tried with dual() but no success

sunny_talwar

Do you have a sample you can share?

marcus_sommer

This don't work?

=dual(

time(subfield(Class((T_SEG),(1/24/60)*$(VInput)),' ',1),'hh:mm')

& ' to '

& time(subfield(Class((T_SEG),(1/24/60)*$(VInput)),' ',5),'hh:mm'),

num(subfield(Class((T_SEG),(1/24/60)*$(VInput)),' ',1)))

- Marcus

Anonymous
Not applicable
Author

Nope!!

See the attachment..

If I try in like Properties -> Sort -> Text -> A-Z, it works but with some selection it does not work, so I thought to go for expression to sort...

Anonymous
Not applicable
Author

Shared.