Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
anelmorales
Contributor II
Contributor II

Average calls per day using IF Else Set Analysis

Hello guys,

Currently we are looking to calculate the average number of calls per day, based on If Else conditions.

We want to start calculating the average calls from March 3, 2020 until March 31, 2020.

And also have the average calls of the other months starting from the 1st day of the month to the last day. I'm using Today(). 

But when we apply a filter for a past month, like March, the formula breaks, I was thinking in using Max(Call_Date) but it doesn't work if an Agent doesn't continue making calls during the following days of the month. I know there is a feature we could use, like a Master Calendar, but I don't know if this could help. 

=Avg(if(Max(Month([Leave Time])) = '3'

,Count(distinct[Call Name]) / NetWorkDays(Date('03/16/2020','mm/dd/yyyy'),Date('03/31/2020','mm/dd/yyyy')),

   if(Not(Max(Month([Leave Time])) = '3')

 ,Count(distinct[Call Name]) / NetWorkDays(MonthStart(Today()),Today())

   )) ,[Call Name] ))

  

 Could you please help me understand how we can solve the issue? Maybe there is a feature like a Master Calendar that could help.

Labels (1)
1 Reply
Brett_Bleess
Support (Former)
Support (Former)

Have a look through the following Design Blog post, hopefully that will provide some further clues on how to approach things for your use case:

https://community.qlik.com/t5/Qlik-Design-Blog/Average-Which-average/ba-p/1466654

If you need to search the Design Blog area further, use the following URL:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.