Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. 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

Labels (1)
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
Master
Master

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