Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.

krishna_2644
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