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: 
Not applicable

Avg between two timestamps

Hello,

I'm trying to get the average of a column between certain time, 7-7:30 am for this one:

=Avg({<Time(CreateTimestamp,'hh:mm')={">='07:00')<='07:30'"}>}[Total Time])

Something is wrong here, not sure what.  Thanks in Advance

3 Replies
sunny_talwar

Try this:

=Avg({<CreateTimestamp={"=Time(CreateTimestamp,'hh:mm') >='07:00') and Time(CreateTimestamp,'hh:mm') <='07:30'"}>}[Total Time])

Not 100% sure if it will work, but I feel it should work.

Qrishna
Specialist III
Specialist III

See Attached.

it shows how you can calculate Avg(RandomData) for a Time Range.

Hope that helps.

Krishna.

maxgro
MVP
MVP

=Avg(if(frac(timestamp)>=7/24 and frac(timestamp)<=7.5/24, frac(timestamp)))

then format the expression result in number tab (time)

1.png