Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
zelalemdatew
Contributor II
Contributor II

Sorting time in Filter Pane

Hi all,

So, I am fairly new to Qlik. I created an app with time filter pane and time is AM and PM format. I tried to sort using the sort tab, but it is sorting like 1AM 1PM 2AM 2PM... I would like to see the time to be 1AM 2AM 3AM... 11AM and then PMs will continue. Can anyone please help ?

Thanks in advance.

 
1 Solution

Accepted Solutions
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

try to sort by this expression

Purgechar(field,'AMPM')+If(Index(field,'AM')>0,0,12)

View solution in original post

5 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

try to sort by this expression

Purgechar(field,'AMPM')+If(Index(field,'AM')>0,0,12)

Vegar
MVP
MVP

You could try to create a time of your field in the script. 

 

Time#(YourTimeField, 'hTT') as YourTimeField

 

Then you can sort numerically. 

zelalemdatew
Contributor II
Contributor II
Author

It works. Thank you so much!

Vegar
MVP
MVP

That's great!

zelalemdatew
Contributor II
Contributor II
Author

This worked Thanks!