Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort Line Chart by Timestamp Dimension

Hello,

Thanks for looking at and reading my question.

I have created a line chart that has x-axis value as timestamp format. I already tried the following option however its not sorting properly.

I want the data to be sorted till minute precision.

Properties -> Sort -> Expression ->

//date(BEGIN_INTERVAL_TIME,'DD/MM/YYYY hh:mi')

//BEGIN_INTERVAL_TIME

//=num(date(BEGIN_INTERVAL_TIME,'DD/MM/YYYY hh:mi'))

//(Date(Date#(Left([BEGIN_INTERVAL_TIME],10),'MM/DD/YYYY'),'MM/DD/YYYY'))

//Time#(BEGIN_INTERVAL_TIME,'DD/MM/YYYY hh:mi')

//time(frac(BEGIN_INTERVAL_TIME))

Please suggest what should I use to get the correct sort order.

Regards,

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It sounds like you have not loaded the BEGIN_INTERVAL_TIME as a proper timestamp value.

Try to parse it in the load like:

timestamp(timestamp#(BEGIN_INTERVAL_TIME, 'MM/DD/YY hh:mm:ss')) as BEGIN_INTERVAL_TIME

adjust the format pattern to match your input. Then you should be able to sort the dimension by Numeric value as Saranya suggested

-Rob

View solution in original post

10 Replies
Not applicable
Author

Did you try this:

Properties -> Sort -> Select your dimension on Xaxis

then enable numericvalue

hope it may help......

Not applicable
Author

doesn't help.

tresesco
MVP
MVP

Could you upload sample qvw here?

Not applicable
Author

Hi,

Can you upload a sample qvw file.

Not applicable
Author

Thanks a lot for replying to my question.

I cannot load my qvw file as its a secure data. Is there any other option for you to tell me, how to sort?

Regards,

tresesco
MVP
MVP

Could be told, but would be hypothetical without seeing your data format. See : Preparing examples for Upload - Reduction and D... | Qlik Community

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It sounds like you have not loaded the BEGIN_INTERVAL_TIME as a proper timestamp value.

Try to parse it in the load like:

timestamp(timestamp#(BEGIN_INTERVAL_TIME, 'MM/DD/YY hh:mm:ss')) as BEGIN_INTERVAL_TIME

adjust the format pattern to match your input. Then you should be able to sort the dimension by Numeric value as Saranya suggested

-Rob

Not applicable
Author

Thanks a lot Rob for your time and reply.

I will try it and get back.

Regards,

Not applicable
Author

Didn't help. After that its not showing the graph at all.