Suite | Professional、Enterprise、またはEnterprise Plus |
Support | + Explore Professional または Enterprise |
集計レベルの関数を使用すると、レポートのメトリックをスライスする属性を指定でき、Exploreのレポートをより詳細に制御できます。
通常は、メトリックと複数の属性をレポートに追加すると、メトリックはすべての属性によってスライスされます。属性がメトリックをスライスしないようにすることも、レポートに表示されずにバックグラウンドでメトリックをスライスする属性を追加することもできません。ただし、集計レベルの関数を使用すると、どの属性でメトリックをスライスするかを正確に指定することができます。
この記事では、次のトピックについて説明します。
使用できる集計レベル関数
Exploreには次のような集計レベル関数があります。
関数 | 説明 | 例 |
---|---|---|
ATTRIBUTE_FIX(メトリック、属性1、属性2、...) |
関数に指定された属性によってのみ、メトリックをスライスします。 レポート(「列」パネルまたは「行」パネル)に追加された属性はメトリックをスライスしませんが、適用されたフィルターは考慮されます。 レポートの結果が特定の属性の影響を受けないようにするために使用でき、特にパーセンテージを計算する場合に便利です。 |
この例では、レポートに追加された属性に関係なく、1年の各月の初回返信時間の中央値が返されます。 |
ATTRIBUTE_ADD(メトリック、属性1、属性2、...) |
レポートに追加された属性に加えて、関数に指定された属性にもメトリックの集計範囲を広げます。 レポートに追加された属性によってメトリックがスライスされ、適用されたフィルターが考慮されます。 レポートに存在しない属性に基づいて、事前に集計されたメトリックの平均値または中央値を計算するために使用できます。 |
この例では、レポートの属性で集計される前の、1年の各月の初回返信時間の中央値が返されます。 |
ATTRIBUTE_FIX関数を使用する
以下の最初の例では、ATTRIBUTE_FIX関数がどのように機能するかを示し、2番目と3番目の例では可能なユースケースを示しています。
グループごとのチケットの合計数を求める
この例では、ATTRIBUTE_FIX関数がどのように機能するかを示します。レポートの属性によってスライスされることなく、各グループ内のチケットの合計数を返すメトリックを作成します。
グループごとのチケットの合計数を求めるには
- 「Support - Tickets」データセットを使用して新しいレポートを作成します。
-
次の式を使用して、「Tickets fixed to group」という名前の標準ユーザー定義メトリックを作成します。
ATTRIBUTE_FIX(COUNT(Tickets), [Ticket group])
- 「メトリック」パネルで、「チケット」メトリックと「Tickets fixed to group」メトリックを追加します。2番目のメトリックにはSUM集計方法を使用します。
- 「行」パネルで「チケットのグループ」属性を追加します。この時点で、両方のメトリックは各グループのチケット数を示します。
- 「行」パネルで「チケットのステータス」属性を追加します。現在、「チケット」メトリックはチケットのステータスとグループでスライスされますが、「Tickets fixed to group」メトリックはチケットのステータスを無視し、チケットグループによってのみスライスされます。
四半期の総数からチケットの割合を求める
この例では、四半期ごとに作成されたチケットの総数に対する、各月に作成されたチケットの割合を示すレポートを作成します。
四半期の総数からチケットの割合を求めるには
- 「Support - Tickets」データセットを使用して新しいレポートを作成します。
-
次の式を使用して、「% of quarterly volume」という名前の標準ユーザー定義メトリックを作成します。
COUNT(Tickets) / ATTRIBUTE_FIX(COUNT(Tickets), [Ticket created - Year], [Ticket created - Quarter])
- 前の手順で作成したユーザー定義メトリックを開き、「オプション」>「表示形式を編集」をクリックして、最初のフィールドで「%」を選択します。
- 「メトリック」パネルで、「チケット」メトリックと「%of quarterly volume metrics」メトリックを追加します。2番目のメトリックにはSUM集計方法を使用します。
- 「行」パネルで、次の属性を追加します。
- チケットの作成日時 - 年
- チケットの作成日時 - 四半期
- チケットの作成日時 - 月
レポートは次のようになります。
年間の全体の解決時間を比較する
この例では、各年の全体解決時間の平均を示し、それを全体の平均解決時間と比較するグラフを作成します。
年間の全体の解決時間を比較するには
- 「Support - Tickets」データセットを使用して新しいレポートを作成します。
-
次の式を使用して、「Full resolution time (fixed)」という名前の標準ユーザー定義メトリックを作成します。
ATTRIBUTE_FIX(AVG(Full resolution time (min)))
- 「Metrics」パネルで、「Full resolution time (min)」と「Full resolution time (fixed)」を追加します。
- 「Columns」パネルで、「Ticket created - Year」を追加します。
ATTRIBUTE_ADD関数を使用する
以下の最初の例では、ATTRIBUTE_ADD関数がどのように機能するかを示し、それ以降の例ではユースケースを示します。
グループごとのチケットの平均数を求める
この例では、ATTRIBUTE_ADD関数がどのように機能するかを示します。レポートにグループ属性を追加することなく、グループごとの平均チケット数を返すメトリックを作成することになります。
グループごとのチケットの平均数を求めるには
- 「Support - Tickets」データセットを使用して新しいレポートを作成します。
-
次の式を使用して、「Tickets per group」という名前の標準ユーザー定義メトリックを作成します。
ATTRIBUTE_ADD(COUNT(Tickets), [Ticket group])
- 「メトリック」パネルで、「チケット」メトリックを追加します。
- 「行」パネルで「チケットのグループ」属性を追加します。
-
結果操作(
)メニューを開き、「合計」を選択し、AVG集計方法を使用して「行」に「以下の合計」を設定します。
- 「メトリック」パネルで、「Tickets per group」ユーザー定義メトリックを追加します。AVG集計方法を使用します。レポート内の両方のメトリックは、各グループのチケット数を示し、グループごとの平均が表の下部に表示されます。
ただし、この例では、テーブルにグループを表示せず、グループごとの平均チケット数のみを表示します。 - 「行」パネルで、「チケットのグループ」属性を削除し、合計の結果操作も削除します。「チケット」メトリックはアカウント内のチケットの合計数を返しますが、「Tickets fixed to group」はグループあたりの平均チケット数を返します。
- (オプション)「行」パネルで、メトリックをスライスしたいその他の属性があれば追加します。たとえば、「チケットのステータス」属性を追加します。ここで、「チケット」メトリックは各ステータスのチケットの合計数を返しますが、「Tickets per group」は各ステータスのグループごとのチケットの平均数を返します。
四半期または1年間の各月のチケット数の平均値および中央値を求めます。
この例では、月ごとに作成されたチケットの平均値と中央値を示すレポートを作成します。
四半期または1年間の各月のチケット数の平均値および中央値を求めるには
- 「Support - Tickets」データセットを使用して新しいレポートを作成します。
-
次の式を使用して、「Tickets per month」という名前の標準ユーザー定義メトリックを作成します。
ATTRIBUTE_ADD(COUNT(Tickets), [Ticket created - Year], [Ticket created - Month])
- 「メトリック」パネルで、「チケット」メトリックと「Tickets per month」メトリックを追加します。2番目のメトリックにはAVGおよびMED集計方法を使用します。(複数の集計方法を選択するには、メトリックを展開し、追加する各集計方法を選択します。)
- 「行」パネルで、「チケットの作成日時 - 年」属性と「チケットの作成日時 - 四半期」属性を追加します。その結果、レポートには四半期の1か月あたりのチケット数の平均値と中央値が示されます。
- (オプション)「チケットの作成日時 - 四半期」属性を削除して、各年の1か月ごとのチケット数の平均値と中央値を確認します。
担当者ごとの最長平均解決時間を求めます。
この例では、すべての担当者を対象に、平均解決時間が最も長いKPIを作成します。
担当者ごとの最長平均解決時間を求めるには
- 「Support - Tickets」データセットを使用して新しいレポートを作成します。
-
次の式を使用して、「Resolution time per assignee」という名前の標準ユーザー定義メトリックを作成します。
ATTRIBUTE_ADD(AVG(Full resolution time (days)), [Assignee ID])
- 前の手順で作成したユーザー定義メトリックを開き、「オプション」>「表示形式を編集」をクリックします。
- 最初のフィールドで、「カスタム」を選択し、「小数位」を「1」に、「サフィックス」を「日」に設定します(語の前にスペースを入れます)。
- 「メトリック」パネルで、「Resolution time per assignee」メトリックを追加します。MAX集計方法を使用します。
- 「フィルター」パネルで、「チケットの解決日時 - 日」属性を追加し、過去30日間に解決されたチケットを表示するように設定します。
レポートには、過去30日間のすべての担当者の中で、最も長い平均解決時間が示されます。
エージェントごとの平均チケットコメント数を求める
この例では、エージェントによって送信されたコメントのチケットごとの平均数を示す棒グラフを作成します。
エージェントごとの平均チケットコメント数を求めるには
- 「Support - Tickets」データセットを使用して新しいレポートを作成します。
-
次の式を使用して、「Comments per ticket」という名前の標準ユーザー定義メトリックを作成します。
ATTRIBUTE_ADD(COUNT(Comments), [Update ticket ID])
- 前の手順で作成したユーザー定義メトリックを開き、「オプション」>「表示形式を編集」をクリックします。
- 最初のフィールドで、「カスタム」を選択し、「小数位」を「1」に設定します。
- 「メトリック」パネルで、「Comments per ticket」メトリックを追加します。AVG集計方法を使用します。
- 「フィルター」パネルで、以下の属性を追加します。
- 更新 - 日付:先週の更新を表示する場合に設定します。
- 更新者のロール:エンドユーザーを除外するには、これを設定します。
- 「表示タイプ」(
)メニューで、「棒」を選択します。
このレポートには、エージェントごとのチケットコメントの平均数が示されます。
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
サインインしてコメントを残します。