Suite | Professional, Enterprise, or Enterprise Plus |
Support with | Explore Professional or Enterprise |
使用聚合级别函数可以指定应根据哪些属性对报告中的指标进行切片,以便您更好地控制 Explore 报告。
通常,当您在报告中添加一个指标和多个属性时,该指标将按所有这些属性进行切片。您不能阻止属性对指标进行切片,也不能添加可在后台对报告中不存在的指标进行切片的属性。但是,使用聚合级别函数可以准确指定应根据哪些属性对指标进行切片。
本文章包含以下主题:
可用的聚合级别函数
Explore 具有以下聚合级别函数。
函数 | 描述 | 例如 |
---|---|---|
ATTRIBUTE_FIX(metric, attribute1, attribute2, ...) |
仅按函数中指定属性对指标进行切片。 添加到报告(在列或行面板中)的属性不会对指标进行切片,但会考虑应用的所有筛选条件。 可用于防止报告结果受特定属性影响,这对于计算百分比特别有用。 |
本例中,将返回一年中每个月首次回复时间的中值,而不考虑添加到报告中的属性。 |
ATTRIBUTE_ADD(metric, attribute1, attribute2, ...) |
将指标聚合扩展到函数中指定属性,以及添加到报告中的属性。 添加到报告的属性会对指标进行切片,并会考虑应用的所有筛选条件。 可用于根据不在报告中的属性计算预先聚合的指标平均值或中值。 |
本例中,将返回一年中每个月首次回复时间的中值,然后按报告中的属性进行聚合。 |
使用 ATTRIBUTE_FIX 函数
以下第一个示例说明了 ATTRIBUTE_FIX 函数的工作方式,第二个和第三个示例介绍了可能的用例。
查找每组的工单总数
本例说明了 ATTRIBUTE_FIX 函数的工作方式。我们将创建一个指标,该指标将返回每组的工单总数,而不根据报告中的属性进行切片。
查找每组的工单总数
- 在 Support - 工单数据集中创建新报告。
-
使用以下公式创建一个标准计算指标,取名为固定到组的工单:
ATTRIBUTE_FIX(COUNT(Tickets), [Ticket group])
- 在指标面板中,添加工单和固定到组的工单指标。对第二个指标使用总值聚合器。
- 在行面板中,添加工单组属性。此时,两个指标都显示了每组的工单数。
- 在行面板中,添加工单状态属性。现在,工单指标按工单状态和组进行切片,而固定到组的工单指标则忽略工单状态,仅按工单组进行切片。
查找每季度工单量的百分比
本例中,我们将创建一个报告,显示每个月创建的工单总数占每个季度创建的工单总数的百分比。
查找每季度工单量的百分比
- 在 Support - 工单数据集中创建新报告。
-
使用以下公式创建一个标准计算指标,取名为每季度工单量的 %:
COUNT(Tickets) / ATTRIBUTE_FIX(COUNT(Tickets), [Ticket created - Year], [Ticket created - Quarter])
- 打开刚创建的计算指标,单击选项 > 编辑显示格式,然后在第一个字段中选择 %。
- 在指标面板中,添加工单和每季度工单量的 % 指标。对第二个指标使用总值聚合器。
- 在行面板中,添加以下属性:
- 已创建工单 - 年度
- 已创建工单 - 季度
- 已创建工单 - 月度
您的报告应如下所示:
比较每年和总体完全解决时间
本例中,我们将创建一个图表,显示每年平均完全解决时间,并将其与总体平均解决时间进行比较。
比较每年和总体完全解决时间
- 在 Support - 工单数据集中创建新报告。
-
使用以下公式创建一个标准计算指标,取名为完全解决时间(固定):
ATTRIBUTE_FIX(AVG(Full resolution time (min)))
- 在指标面板中,添加完全解决时间(分钟)和完全解决时间(固定)。
- 在列面板中,添加已创建工单 - 年度。
使用 ATTRIBUTE_ADD 函数
以下第一个示例说明了 ATTRIBUTE_ADD 函数的工作方式,随后示例介绍了可能的用例。
查找每组的平均工单数
本例说明了 ATTRIBUTE_ADD 函数的工作方式。我们将创建一个指标,该指标会返回每组的平均工单数,而不将组属性添加到报告中。
查找每组的平均工单数
- 在 Support - 工单数据集中创建新报告。
-
使用以下公式创建一个标准计算指标,取名为每组的工单数:
ATTRIBUTE_ADD(COUNT(Tickets), [Ticket group])
- 在指标面板中,添加工单指标。
- 在行面板中,添加工单组属性。
- 打开结果操作 (
) 菜单,选择总数,然后使用平均聚合器将总计设置为行。
- 在指标面板中,添加创建的每组的工单数计算指标。使用平均聚合器。报告中两个指标都显示了每组的工单数,每组的平均值显示在表格底部。
但是,本例中,我们不想在表格中显示组,而只想显示每组的平均工单数。 - 在行面板中,移除工单组属性和“总计结果操作”。工单指标会返回帐户中工单总数,而固定到组的工单则会返回每组的平均工单数。
- (可选)在行面板中,添加要对指标进行切片的任何其他属性。例如,添加工单状态属性。现在,工单指标会返回每个状态下的工单总数,而固定到组的工单则会返回每个状态下每组的平均工单数。
查找每个季度或每年的每月工单平均数和中值
本例中,我们将创建一个报告,显示每月创建的工单平均数和中值。
查找每个季度或每年的每月工单平均数和中值
- 在 Support - 工单数据集中创建新报告。
-
使用以下公式创建一个标准计算指标,取名为每月工单数:
ATTRIBUTE_ADD(COUNT(Tickets), [Ticket created - Year], [Ticket created - Month])
- 在指标面板中,添加工单和每月工单数指标。使用平均和中位数聚合器作为第二个指标。(要选择多个聚合器,展开指标并选择要添加的所有聚合器。)
- 在行面板中,添加已创建工单 - 年度和已创建工单 - 季度属性。这样报告将显示每个季度的每月工单平均数和中值:
- (可选)移除已创建工单 - 季度属性可查看每年的每月工单平均数和中值。
查找每个受托人的最高平均解决时间
本例中,我们将创建一个关键绩效指标,显示所有受托人的最高平均解决时间。
查找每个受托人的最高平均解决时间
- 在 Support - 工单数据集中创建新报告。
-
使用以下公式创建一个标准计算指标,取名为每个受托人的解决时间:
ATTRIBUTE_ADD(AVG(Full resolution time (days)), [Assignee ID])
- 打开刚创建的计算指标,单击选项 > 编辑显示格式。
- 在第一个字段中,选择自定义,然后将小数位数设置为 1,将后缀设置为天(该词前加一个空格)。
- 在指标面板中,添加每个受托人的解决时间指标。使用最大值聚合器。
- 在筛选面板中,添加已解决工单 - 日期属性,并将其配置为显示最近 30 天内已解决的工单。
这样报告将显示过去 30 天内所有受托人的最高平均解决时间。
查找每个专员的平均工单评论数
本例中,我们将创建一个条形图,显示专员为每张工单提交的平均评论数。
查找每个专员的平均工单评论数
- 在 Support - 工单数据集中创建新报告。
-
使用以下公式创建一个标准计算指标,取名为每张工单的评论数:
ATTRIBUTE_ADD(COUNT(Comments), [Update ticket ID])
- 打开刚创建的计算指标,单击选项 > 编辑显示格式。
- 在第一个字段中,选择自定义,然后将小数位数设置为 1。
- 在指标面板中,添加每张工单的评论数指标。使用平均聚合器。
- 在筛选面板中,添加以下属性:
- 更新 - 日期:设置此项可显示上周更新。
- 更新者用户角色:设置此项可排除终端用户。
- 在可视化类型 (
) 菜单中,选择条形图。
报告将显示每个专员的平均工单评论数。
13 条评论
Andrei Kamarouski
Dane Hey, thx for coming back. Seems like you missed my point. :) Let me explain another way.
I don't need to calculate this data per brand on the account. I need it per the whole account with multiple brands. Do you see?
0
Dane
You can try to use the SUM aggregator instead of COUNT. I have tried to make a query and compared it to the actual Solved ticket per brand and it provided the same data.
0
Andrei Kamarouski
Hi Eugene Orman, I need your expert help =)
I am using this formula to find the global average of Solved tickets in the whole Zendesk instance (it has just one single brand). I can slice the reports with this metric by Dat Solved to have the average per any time period.
However, it doesn't work when there are multiple brands in Zendesk (because giving the average per brand). Is there really any attribute that is a global one for the whole Zendesk instance that has multiple brands? Can't find anything and custom attributes don't seem to work here as well.
1
Dainne Kiara Lucena-Laxamana
It would be for all the years since the ATTRIBUTE_ADD returns the value of aggregator(metric name) aggregated to all attributes in the report in addition to attribute1 and attribute2.
0
Laura
Hello Dainne Lucena,
Thanks for your reply.
My question however still prevails.
In the example that you provide, the results of what year are being rendered? Wouldn't you have to specify which year?
0
Dainne Kiara Lucena-Laxamana
Hi Laura Dell'Angela
That's a great question. As the article described, "This example illustrates using the ATTRIBUTE_ADD function which slices the metric you specify by all attributes in the report plus the one you specify."
As you can see, the ATTRIBUTE_ADD actually uses the COUNT(ticket) metric for the custom-calculated metric in the samples:
This is for scenarios just like in the article where you want to display results without needing to slice the data, So instead of adding COUNT (tickets) + the attribute for tickets created in a year, since you don't want to list down the years and want just an average, you'd create your own metric with the ATTRIBUTE_ADD.
Hope this clears things out! Let me know if you have any follow-up questions.
0
Laura
Hey,
Thanks for this article first of all. The use case of ATTRIBUTE_FIX seems pretty clear to me. However, I am having some trouble understanding the purpose of the ATTRIBUTE_ADD. In theory it makes sense, but I am confused in regards to the last example: 'Display the maximum number of tickets received from one channel in a month without showing the channel names'.
My confusion is this:
The metric returns the maximum number of tickets received by ALL channels in a month. In this case, why should we not just use the default COUNT(tickets) metric?
However, if we want to return the maximum number of tickets received by ONE (and only one) channel, must we not add a filter to the metric, choosing just one channel?
This does not seem clear in the article. Thank you in advance for your help!
Laura,
0
Rosie
Attribute functions could be used in any dataset. Let me go ahead and create a separate ticket on your behalf so I can get more account-specific details to troubleshoot this issue. Please expect an email shortly with the ticket information.
0
Crawford Philleo
Hey there -
I'm having a tough time getting the ATTRIBUTE_FIX function to load metrics consistently on queries in the Ticket Updates data set. I thought this could be useful to build a metric have a count of Tickets created or solved by month, while also being able to slice another metric like Handling Time by various attributes (like individual agents or groups of agents) so you could measure those against total volume per month on a time series. I'm getting time-outs if I go beyond like a day's worth of data using the "Update - Date" time attribute as a filter, but when I just look at that one day, it looks correct. Does the ATTRIBUTE_FIX function not really work as well for the Ticket Updates data set or is there something inherently wrong with my approach?
0
Gab Guinto
If you're looking to display each agent's resolution time and the groups' averages then, yes, you can use attribute_fix to build a metric that will only be sliced by ticket group. But, if what you're trying to do is to compare individual resolution times with the entire team's (not the ticket/agent group's) average resolution time, then you might want to use a fixed calculated metric (Adding fixed calculated metrics).
0
登录以发表评论。