Join 呼叫中心计算月度和年度百分比

Join 呼叫中心计算月度和年度百分比,join,aggregate-functions,percentage,cognos,Join,Aggregate Functions,Percentage,Cognos,我正试图为呼叫中心整合管理信息 我在每次记录的通话中都有以下信息: [CreatedOn]=创建日期和时间 [案例\状态\名称]=结束通话的原因(由第1行接听、转接至第2行、回拨请求等) 现在我要做的是一个图表,它将在一行中显示过去12个月内第一行接听的电话的百分比和第一行关闭的电话的年平均百分比 我可以通过提取功能从[CreatedOn]获取月份,这一年也是如此。 我可以用一个简单的if语句将[Case\u status\u name]分组到第1行应答和其他所有内容中。 但是我很难把月份和年度

我正试图为呼叫中心整合管理信息

我在每次记录的通话中都有以下信息: [CreatedOn]=创建日期和时间 [案例\状态\名称]=结束通话的原因(由第1行接听、转接至第2行、回拨请求等)

现在我要做的是一个图表,它将在一行中显示过去12个月内第一行接听的电话的百分比和第一行关闭的电话的年平均百分比

我可以通过提取功能从[CreatedOn]获取月份,这一年也是如此。 我可以用一个简单的if语句将[Case\u status\u name]分组到第1行应答和其他所有内容中。 但是我很难把月份和年度的百分比都计算正确

如果我只计算年平均数或计算月平均数,我就能得到合理的数据。但是当我尝试一起做的时候,我得到了各种疯狂的价值观

在同一张表中获得月度和年度百分比的正确方法是什么

  • 创建查询
  • 使用表达式添加列[Month]

    _first_of_month([CreatedOn])
    
    1
    
    case when [Case_status_name] = 'Answered by 1st line' then 1 else 0 end
    
    case when [Case_status_name] = 'closed by the first line' then 1 else 0 end
    
    [Answered by 1st line] / [Total]
    
    sum([closed by the first line] for report) / sum([Total] for report)
    
  • 使用表达式添加查询项[Total]

    _first_of_month([CreatedOn])
    
    1
    
    case when [Case_status_name] = 'Answered by 1st line' then 1 else 0 end
    
    case when [Case_status_name] = 'closed by the first line' then 1 else 0 end
    
    [Answered by 1st line] / [Total]
    
    sum([closed by the first line] for report) / sum([Total] for report)
    
  • 使用表达式添加查询项[由第1行回答]

    _first_of_month([CreatedOn])
    
    1
    
    case when [Case_status_name] = 'Answered by 1st line' then 1 else 0 end
    
    case when [Case_status_name] = 'closed by the first line' then 1 else 0 end
    
    [Answered by 1st line] / [Total]
    
    sum([closed by the first line] for report) / sum([Total] for report)
    
  • 使用表达式添加查询项[由第一行关闭]

    _first_of_month([CreatedOn])
    
    1
    
    case when [Case_status_name] = 'Answered by 1st line' then 1 else 0 end
    
    case when [Case_status_name] = 'closed by the first line' then 1 else 0 end
    
    [Answered by 1st line] / [Total]
    
    sum([closed by the first line] for report) / sum([Total] for report)
    
  • 筛选此查询

    [CreatedOn] between _first_of_month(_add_months(current_date;-12))
                    and _last_of_month(_add_months(current_date;-1))
    
  • 使用表达式添加查询项[%of calls responsed by the 1st line]

    _first_of_month([CreatedOn])
    
    1
    
    case when [Case_status_name] = 'Answered by 1st line' then 1 else 0 end
    
    case when [Case_status_name] = 'closed by the first line' then 1 else 0 end
    
    [Answered by 1st line] / [Total]
    
    sum([closed by the first line] for report) / sum([Total] for report)
    
  • 使用表达式添加查询项[12个月平均值]

    _first_of_month([CreatedOn])
    
    1
    
    case when [Case_status_name] = 'Answered by 1st line' then 1 else 0 end
    
    case when [Case_status_name] = 'closed by the first line' then 1 else 0 end
    
    [Answered by 1st line] / [Total]
    
    sum([closed by the first line] for report) / sum([Total] for report)
    
  • 基于此查询生成图形

  • 对非常感谢。这需要一些欺骗,但我得到了我想要的结果!