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?
- create query
add column [month] expression
_first_of_month([createdon])add query item [total] expression
1add query item [answered 1st line] expression
case when [case_status_name] = 'answered 1st line' 1 else 0 endadd query item [closed first line] expression
case when [case_status_name] = 'closed first line' 1 else 0 endfilter query
[createdon] between _first_of_month(_add_months(current_date;-12)) , _last_of_month(_add_months(current_date;-1))add query item [% of calls answered 1st line] expression
[answered 1st line] / [total]add query item [12-month average] expression
sum([closed first line] report) / sum([total] report)- build graph based on query
Comments
Post a Comment