Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
MalcolmCICWF
Creator III
Creator III

Timestamp on Y Axis?

So I may be over complicating this, but I have a bar chart that I can't figure out just how to get my timestamp (ex 8:35 AM) on the Y Axis while having the day of the month on the X axis.

I have as a dimension a "Job name", each has a specific end time. I wan to be able to select the Job Name and see on the bar chart at which time it finished each day. Can I just display the time in the expression some how, or do I have to have an aggregation function in the expression?

The attached is a screen shot of my chart, but the Y axis is incorrect because I did a sum of a hh:mm TT format...

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If there is only one value per day, you can use

=only(EndTimeField)

If there are more than one value per day, you'll need to decide what you want to show, maybe the average time?

=avg(EndTimeField)

It looks to me that your current field is indeed a timestamp field, containing date and time.

Use frac() to get only the time part:

=only(frac(EndTimeField))

=avg(frac(EndTimeField))

Then format your expression results on number tab as time or interval.

View solution in original post

4 Replies
MarcoWedel

If there is only one value per day you might not need an aggregation at all.

The reason for the values on your expression axis starting at 1900 could be the "forced 0" check box in the axes tab showing your timestamp starting from 0 (=year 1900).

Try to uncheck it.

As you mentioned, you want to show time values, you might have to extract the time part from your timestamp using

Time(Frac(YourTimestamp))

in your expression as well. ("forced 0" then could remain checked).

hope this helps

regards

Marco

swuehl
MVP
MVP

If there is only one value per day, you can use

=only(EndTimeField)

If there are more than one value per day, you'll need to decide what you want to show, maybe the average time?

=avg(EndTimeField)

It looks to me that your current field is indeed a timestamp field, containing date and time.

Use frac() to get only the time part:

=only(frac(EndTimeField))

=avg(frac(EndTimeField))

Then format your expression results on number tab as time or interval.

MalcolmCICWF
Creator III
Creator III
Author

Thanks, I was not aware of the Only function