join - Call center Calculating monthly and annual percentage -


i'm trying put management information call center.

i've got following info on every call gets logged: [createdon] = date & time of creation [case_status_name] = reason closing call (answered 1st line, transferred 2nd, call request etc.)

now i'm looking make graph show in 1 line % of calls answered 1st line , annual average% of calls closed first line during last 12 months.

i can months [createdon] extract function, same goes year. can group [case_status_name] in 1st line answered , else simple if statement. i'm having trouble getting percentages right both month , year together.

i can sensible data if calculate yearly average or if calcluate monthly average. when try them together, wind getting kinds of crazy values.

what proper way monthly , annual percentage in same table?

  1. create query
  2. add column [month] expression

    _first_of_month([createdon]) 
  3. add query item [total] expression

    1 
  4. add query item [answered 1st line] expression

    case when [case_status_name] = 'answered 1st line' 1 else 0 end 
  5. add query item [closed first line] expression

    case when [case_status_name] = 'closed first line' 1 else 0 end 
  6. filter query

    [createdon] between _first_of_month(_add_months(current_date;-12))                 , _last_of_month(_add_months(current_date;-1)) 
  7. add query item [% of calls answered 1st line] expression

    [answered 1st line] / [total] 
  8. add query item [12-month average] expression

    sum([closed first line] report) / sum([total] report) 
  9. build graph based on query

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -