Suite | Professional、Enterprise、またはEnterprise Plus |
Support | + Explore Professional または Enterprise |
この記事では、一連のイベントの中で最初または最後のイベントに焦点を当てて計算するのに役立つ、Exploreの日付関数の使い方について説明します。
通常、特定のイベントやイベントの間隔についてレポートを作成する場合、イベントの中には一意でないものがあります。たとえば、1枚のチケットに複数の解決イベントがある場合があります。Exploreの最初と最後の日付の関数は、一意の最初のイベントと最後のイベントを見つけるのに役立ちます。
Exploreには、次の4つの最も古い日付関数と最新の日付関数があります。
- DATE_FIRST(time attribute)
レポートに追加された属性に基づき、適用されたすべてのフィルターの影響を受ける、最も古い日付またはタイムスタンプを返します。
例:DATE_FIRST([更新 - タイムスタンプ])
レポートに追加したすべての属性を考慮して、最も古い更新タイムスタンプを返します。
- DATE_LAST(time attribute)
レポートに追加された属性に基づき、適用されたすべてのフィルターの影響を受ける、最新の日付またはタイムスタンプを返します。
例:DATE_LAST([更新 - タイムスタンプ])
レポートに追加したすべての属性を考慮して、最新の更新タイムスタンプを返します。
- DATE_FIRST_FIX(time attribute, attribute1, attribute2, ...)
関数で指定された属性に従って、最も古い日付またはタイムスタンプを返します。レポートに追加された属性は計算に影響しませんが、適用されているフィルターは考慮されます。
例:DATE_FIRST_FIX([更新 - タイムスタンプ], [更新チケットID])
レポートの属性に関係なく、チケットごとに最も古い更新タイムスタンプを返します。
- DATE_LAST_FIX(time attribute, attribute1, attribute2, ...)
関数で指定された属性に従って、最新の日付またはタイムスタンプを返します。レポートに追加された属性は計算に影響しませんが、適用されているフィルターは考慮されます。
例:DATE_LAST_FIX([更新 - タイムスタンプ], [更新チケットID])
レポートの属性に関係なく、チケットごとに最新の更新タイムスタンプを返します。
最も古い日付関数と最新の日付関数の使用例
ここでは、次の例について説明します。
DATE_LAST関数を使用して、あるグループの月の最終日に解決したチケット数を調べる
この例では、DATE_LAST関数を使用して、最終日に解決したチケットを返すレポートを作成し、レポートに年、月、グループの属性を追加することで、各グループの月の最終日に解決したチケット数を取得します。
レポートを作成するには
- 「Support:Tickets」データセットを使用して新しいレポートを作成します。
- 次の式を使用して、「最終日に解決されたチケット」という名前の標準ユーザー定義メトリックを作成します。
IF DATE_LAST([Ticket solved - Date])=[Ticket solved - Date] THEN [Ticket ID] ENDIF
- 上で作成したメトリックを編集し、デフォルトの集計方法をCOUNTに設定します。他の集計方法は削除します。
- 「チケット」および「最終日に解決されたチケット」のメトリックをレポートビルダーの「メトリック」パネルに追加します。
- 「行」パネルで、「チケットの解決日時 - 年」属性と「チケットの解決日時 - 月」属性を追加します。その月に解決されたチケットの合計数と、月の最終日に解決されたチケット数が表示されます。以下はその例です。
- 「行」パネルで「チケットのグループ」属性を追加します。最終日に解決されたチケットが、年別、月別、さらにグループ別に表示されます。
DATE_FIRST関数を使用して、毎日のチケット割り当てのうち最も古いものを見つける
この例では、DATE_FIRST関数を使用して、最も古いチケットが割り当てられた時刻のタイムスタンプを返すレポートを作成します。次に、担当者と日付の属性を追加して、日付と担当者ごとに最も古い割り当て時刻のタイムスタンプを取得します。
レポートを作成するには
- 「Support:Tickets」データセットを使用して新しいレポートを作成します。
- 次の式を使用して、「最も古い割り当て - タイムスタンプ」という標準ユーザー定義属性を作成します。
IF DATE_FIRST([Ticket first assigned - Timestamp])=[Ticket first assigned - Timestamp] THEN [Ticket first assigned - Timestamp] ENDIF
- 「チケット」メトリックをレポートビルダーの「メトリック」パネルに追加します。
- 「行」パネルで、「担当者名」および「チケットの割り当て日時 - 日」属性を追加します。2つ目の属性を設定して、今週作成されたチケットを表示します。
- 「行」パネルで、「最も古い割り当て - タイムスタンプ」属性を追加し、NULL値を除外してフィルターします。たとえば、毎日のチケット割り当てのうち、最も古いものを担当者ごとに日付別に表示します。
DATE_LAST_FIX関数を使用して、チケットの最終解決日を調べる
チケットが何度も解決されたり、再オープンされたりすることがあります。場合によっては、最新の解決数だけを調べたいこともあるでしょう。この例では、DATE_LAST_FIX関数を使って、チケットの最終解決数を返すメトリックを作成します。
レポートを作成するには
- 「Support:Updates history」データセットを使用して新しいレポートを作成します。
- 次の式を使用して、「最終解決数」という名前の標準ユーザー定義メトリックを作成します。
IF ([Changes - Field name]="status" AND [Changes - Previous value]!="solved" AND ([Changes - New value]="solved" OR [Changes - New value]="closed") AND DATE_LAST_FIX([Update - Timestamp], [Update ticket ID], [Changes - Field name], [Changes - New value])=[Update - Timestamp]) THEN [Update ID] ENDIF
- 上で作成したメトリックを編集し、デフォルトの集計方法をCOUNTに設定します。また、他の集計方法を削除することもできます。
- レポートビルダーの「メトリック」パネルに、「解決数」メトリックと「最終解決数」メトリックを追加します。
- 「フィルター」パネルで、「更新 - 日付」属性を追加し、過去30日間の更新を表示するように設定します。このレポートは、解決したチケットの合計数と最終的に解決されたチケットの数を返します。「変更されたチケットグループ」などの任意の属性を使用して、これらのメトリックを切り出すことができます。
DATE_LAST_FIX関数を使用して、最新のエージェントコメントの時間を調べる
この例では、DATE_LAST_FIX関数を使用して、レポート属性では切り出しできない最新のエージェントコメントのタイムスタンプを返す属性を作成します。このレポートは、長い間使用されていないエージェントライセンスを検出するのに役立ちます。
レポートを作成するには
- 「Support:Updates history」データセットを使用して新しいレポートを作成します。
- 次の式を使用して、「最新のエージェントコメント - タイムスタンプ」という標準ユーザー定義属性を作成し、「時間属性式に並べ替え」属性の設定を有効にします。
IF ([Comment present]=TRUE AND [Comment public]=TRUE AND DATE_LAST_FIX([Update - Timestamp],[Comment present],[Comment public],[Updater name])=[Update - Timestamp]) THEN [Update - Timestamp] ENDIF
- 「コメント」メトリックをレポートビルダーの「メトリック」パネルに追加します。
- 「フィルター」パネルで、「チケット作成日時 - 日付」属性を追加し、過去1週間または1か月間の更新を表示するように設定します。
- 「フィルター」パネルで、「更新者 - ロール」属性を追加し、「エージェント」と「管理者」を表示するように設定します。
- 「行」パネルで「更新者 - 名前」属性を追加します。
- 最後に、「行」パネルで「最新のエージェントコメント - タイムスタンプ」属性を追加し、NULL値を除外するようにフィルターします。エージェントのリストとその最新コメントのタイムスタンプが表示されます。
DATE_FIRST_FIX関数を使用して、最初の社内コメントの時間を調べる
Ticketsデータセットで利用可能なデフォルトメトリックの1つに「初回返信時間」があります。これにより、エージェントがエンドユーザーに応答するまでにかかった時間を把握できます。カスタマーの中には、パブリック返信の前に社内コメントをチケットに追加する社内プロセスがある場合があります。
この例では、DATE_FIRST_FIX関数を使って、初回の社内コメントの月別の平均時間を返すレポートを作成します。
レポートを作成するには
- Support:Updates historyデータセットを使用して新しいレポートを作成します。
- 次の式を使用して、「最初の内部コメント - タイムスタンプ」という標準ユーザー定義属性を作成し、「時間属性式に並べ替え」属性の設定を有効にします。
IF ([Comment present]=TRUE AND [Comment public]=FALSE AND DATE_FIRST_FIX([Update - Timestamp],[Update ticket ID],[Comment present],[Comment public])=[Update - Timestamp]) THEN [Update - Timestamp] ENDIF
- 次の式を使用して、「最初の社内コメントの時間(時間)」という名前の標準ユーザー定義メトリックを作成します。
DATE_DIFF([First internal comment - Timestamp], [Ticket created - Timestamp], "nb_of_hours")
- 上で作成したメトリックを編集します。デフォルトの集計方法を「AVG」に、表示形式を「列」に設定し、「小数点以下の桁数」を「1」、「サフィックス」を「時間」に設定します。
- 「フィルター」パネルで、「チケット作成日時 - 日付」属性を追加し、過去3か月の更新を表示するように設定します。
- 「最初の社内コメントの時間(時間)」メトリックをレポートビルダーの「メトリック」パネルに追加します。
- 「列」パネルで、「チケット作成日時 - 月」属性を追加し、過去6か月の更新を表示するように設定します。
- 最後に、「表示タイプ」メニューで、「縦棒」グラフを選択します。最初の社内コメントの時間が月別に表示されます。
43件のコメント
Chad Mitrado
I need help in fixing this:
IF ([Changes - Field name]="assignee_id" AND [Changes - Previous value]=NULL
AND [Changes - New value]!="0" AND [Changes - New value]!=NULL
AND DATE_FIRST_FIX([Update - Timestamp],[Update ticket ID],[Changes - Field name])=[Update - Timestamp])
THEN [Update ticket assignee]
ENDIF
I tried to use the suggestion from this page: https://support.zendesk.com/hc/en-us/articles/4408845631258-Explore-recipe-Finding-the-first-assignee-for-a-ticket, but there's an issue. Every time the system updates the ticket and the “Assignee” becomes NULL, the next assignee is treated as the FIRST, so I added the Date_First_Fix.
The problem now is the NULL values. There are a lot of tickets going to the NULL values even if they were assigned to agents.
I need to count the number of tickets wherein the agent is the FIRST assignee regardless of how many agents handled the ticket.
0
Francis Casino
I'd like to express my agreement with Andrei's input. If you have any additional questions or if there are further concerns that you'd like to discuss, please don't hesitate to reach out. We're here to assist and provide you with any additional information or support that you may require. Your feedback and inquiries are highly valued, and we're committed to ensuring that you receive the best assistance possible.
Thank you for your engagement, and we look forward to addressing any further queries you might have.
0
Andrei Kamarouski
Then use this
instead of this
0
Permanently deleted user
hi Andrei Kamarouski thank you for the formula
-----------
but, is the formula is only for timestamp?
how if i wanted to use only date?
i want to get this value ==> 2023-10-19
not this ==> 2023-10-17T12:48:20
0
Andrei Kamarouski
Hey saasten.implementer, here you are
0
Permanently deleted user
can someone help me how to formula:
"Ticket First Solved - Date" ?
I need to create an attribute like that, thank you
0
Ulises
Hi Eugene Orman,
I followed the steps to show the last agent update, and just like Colin Hutzan, I ran into an issue where there were a lot of Null or blank values. I checked some of those tickets and confirmed that agents had replied to all the tickets that I checked.
I am wondering if any of the following points have some kind of impact?
0
Gabby H
I'm trying to accomplish the same as Jordan and keep getting blank results for tickets that were changed to status "Pending".
0
Jordan Means
I have been trying to build a report where it returns the timestamp that a ticket was first set to pending or on-hold but something isn't right as I am getting null values for some tickets that did have that change happen. The numbers that do get returned appear accurate. This may or may not include other changes in the same update, which I don't care about checking.
My calculated attribute is Update to Pending/On-Hold.
Then I am plugging that into a calculated metric:
I suspect there is something off about the DATE_FIRST_FIX and have tried changing the values there but most combinations lead to nothing at all being returned. Is something causing it to be unable to detect the first change in some cases?
1
Colin Hutzan
Is it possibly to use DATE_FIRST to report on the first date an organization created a ticket?
Our use-case is that we want to understand ticket volumes for newly launched customers. I cannot go off of the date that the organization was added to ZenDesk, because we historically have added organizations when they sign contracts... it can be years before they actually launch.
So, the metric I need is 'first time existing organization submitted a ticket', set it to filter on dates within the last let's say 3 months, and then I would pull in ticket volumes by week for the organizations that fit the calculated metric.
Let me know if I am on the right track here or if this is something impossible.. or possible via another route. Thanks!
0
サインインしてコメントを残してください。