Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculating average per hour for days

I have a set of data containing incoming calls for the past 3 months and I am attempting to create a line chart showing the incoming calls per hour for today as well as the average incoming calls per hour for the past 42 days. 

Here is where I am at...  I have a line chart with dimensions hour(inc_call_time) with a single expression of count(distinct(if(inc_call_time>=timestamp(today()),call_id)))

Now I am attempting to calculate the average for each hour of the day based on the past 42 days and I have had zero luck.  Is it possible with an expression if the date is not a dimension?

I can't access the community from the network I have the file in so I can't provide sample data.  I could probably fake something if someone really needs it.

Thanks.

2 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Send me Data so I can help you ....

Anonymous
Not applicable
Author

Ok, first time doing an inline table.  Let me know if this works for you.

I now want to add a line expression that shows a data point for average calls during that hour based on past days.

The below values aren't the same as in the data set but I tossed them together to help illustrate what I want to do.  Today, 2/15/2013, shows 78 calls at hour 8 and I want an average data point to show 66 calls (calculated from the table below excluding today and rounded down)

DateHourCalls
2/5/2013875
2/6/2013874
2/7/2013871
2/8/2013860
2/9/2013845
2/10/2013862
2/11/2013850
2/12/2013870
2/13/2013870
2/14/2013892
2/15/2013878