在查询中自定义基础指标Customize a base metric in a query

分析师创建用于确定工作区模式和行为的查询。Analysts create queries to determine workplace patterns and behaviors. 创建查询的一个重要步骤是选择一个指标。An important step in the creation of a query is selecting a metric. 这将定义查询的焦点区域。This defines the query's area of focus.

作为分析师,您可以在构建查询时选择指标。As an analyst, you select metrics as you build queries. 您在用于构建查询的页面上看到的指标是 "基本指标",这意味着当您第一次选择一个时,它将显示在一个简单的、未筛选的表单中,例如 "电子邮件时间"。The metrics that you see on the page for building a query are "base metrics", which means that when you first select one, it appears in a simple, unfiltered form, such as "Email hours."

在查询中使用指标Work with metrics in a query

您可以通过以下方式更改查询中使用指标的方式:You can change how a metric is used within a query in the following ways:

  1. 自定义基本指标。Customize the base metric.
  2. 更改基本指标。Change the base metric.
  3. 添加其他基础指标。Add additional base metrics.

自定义基本指标Customize the base metric

选择一个指标后,可以对其进行 自定义After you select a metric you can customize it. 自定义指标在查询中使用时,会产生更精确的结果。A customized metric produces more refined results when used in a query. 通过将筛选器应用于一个指标,可以对其进行自定义。You customize a metric by applying filters to it. 虽然在查询生成器页上执行此操作,但这些筛选器仅适用于应用于查询本身的任何筛选器的指标和函数。Although you do this on the query-builder page, these filters apply only to the metric and function independently from any filters that you apply to the query itself.

例如,您可以从基本指标 "Email hours" 开始。For example, you might start with the base metric "Email hours." 您可以对其进行自定义,使其成为更有针对性的指标: "至少所有与会者和/或收件人的 FunctionType 等于&D。" 的电子邮件时间。You could customize it so that it became a more targeted metric: "Email hours where at least all attendees' and/or recipients' FunctionType equals R&D."

更改基本指标Change the base metric

您还可以更改基本指标。You can also change the base metric. 这意味着要选择一个不同的基础指标来代替您选择的原始指标。This means selecting a different base metric to use in place of the original one you chose.

更改基本指标时保留自定义项Customizations are retained when you change the base metric

上面的示例将 "电子邮件时间" 基准指标自定义为: "电子邮件时间,至少所有与会者和/或收件人的 FunctionType 等于 R&D。"The previous example customized the "Email hours" base metric to be: "Email hours where at least all attendees' and/or recipients' FunctionType equals R&D."

在应用自定义项后,假设要将基本指标从 "电子邮件小时数" 更改 为 "会议过程中发送的电子邮件总数"。After you apply a customization, let's say you want to change the base metric from "Email hours" to "Total emails sent during meetings." 此更改为您提供了保留相同的自定义项的新指标。This change gives you a new metric that has retained the same customization. 您的最终自定义指标为: "会议期间,至少所有与会者和/或收件人的 FunctionType 等于&D 中发送的电子邮件总数。"Your final, customized metric would be: "Total emails sent during meeting where at least all attendees' and/or recipients' FunctionType equals R&D."

换言之,当您从基本指标更改为另一个基础指标时,应用于原始基础指标的自定义设置不会丢失。In other words, the customization that you applied to the original base metric was not lost when you changed from that base metric to a different one.

添加其他基本指标Add additional base metrics

您还可以向查询中添加其他基本指标。You can also add additional base metrics to your query. 您可以执行此操作以修改查询的焦点区域。You would do this to modify the query's area of focus.

演练:自定义和更改基本指标Walkthrough: Customize and change a base metric

若要自定义并更改基本指标,请执行以下操作:To customize and then change a base metric:

  1. 在 "分析 > 查询" 页上,选择要创建的查询类型,如 "人员" 或 "会议查询"。On the Analyze > Queries page, select the type of query you want to create, such as a person or meeting query. 注意:您当前只能为个人或会议查询自定义指标。Note: You currently can only customize metrics for a person or a meeting query.

  2. 在此处选择并更改 " 输入查询名称 " 以命名查询并输入说明。Select and change Enter query name here to name your query and enter a description.

  3. 对于 " 分组依据",选择时间分组选项-天、周或月。For Group by, select a time-grouping option -- day, week, or month.

  4. 选择日期范围和会议排除规则。Select a date range and a meeting exclusion rule.

  5. 在 " 指标 " 部分中,选择 "添加指标" 旁边的加号 (+) 号,然后从列表中选择一个指标:In the Metrics section, select the plus (+) sign next to Add metric and then select a metric from the list:

    添加指标

    Note

    您可以从列表中选择多个指标。You can select multiple metrics from the list. 完成后,选择页面上的其他位置以关闭该列表。When you are finished, select elsewhere on the page to close the list.

    在此示例中,选择 " 冲突会议时间 " 指标:For this example, select the Conflicting meeting hours metric:

    选择冲突的会议时间指标

    选定的指标成为查询的 基本指标 ,表示数据分析的焦点区域。The selected metric becomes the base metric for the query, and represents the area of focus for data analysis.

  6. 按照以下步骤自定义指标:Customize the metric by following these steps:

    a.a. 选择 " 编辑 图标"  编辑图标 Select the Edit icon edit icon. 这将显示用于将筛选器应用于基本指标的选项:This shows the option to apply filters to the base metric:

    自定义指标

    b.b. 选择 " 添加筛选器" 旁边的加号 (+) 符号。Select the plus (+) sign next to Add filter. 现已添加筛选器。A filter is now added. 在我们的示例中,它是发起程序筛选器:In our example, it's the Initiator filter:

    添加筛选器

    c.c. 选择筛选器名称 " 发起人"。Select the filter name, Initiator. 这将显示用于定义电子邮件启动器的筛选器的选项:This shows options that define the filters for email initiators:

    定义筛选器

    d.d. 在可用字段中定义筛选器详细信息。Define the filter details in the available fields. (可选)通过选择和或或或将详细信息添加到其他筛选器来定义其他筛选器 (如果其他筛选器可用) 。Optionally, define other filters (if others are available) by selecting AND or OR and adding details to the additional filters.

    有关正确使用 AND 或 OR 运算符(而不是运算符)的指导,请参阅 Not 运算符For guidance on the proper use of AND or OR operators in conjunction with NOT operators, refer to NOT Operators.

    e.e. 在页面右上角选择 " 确认 "。Select Confirm at the top right of the page.

  7. (可选)现在可以更改基本指标。Optionally, you can now change the base metric. 选择基本指标名称旁边显示的下拉箭头,然后选择不同的指标。Select the drop-down arrow shown next to the name of the base metric, and then select a different metric.

    Note

    • 可自定义的任何基本指标将显示具有可能的更改选项的下拉菜单。Any base metric that is customizable shows a drop-down menu with the possible change options.
    • 并不是所有基本指标都可以更改。Not all base metrics can be changed. 如果没有可用的下拉菜单,则无法更改指标。If no drop-down menu is available, the metric cannot be changed.
    • 更改不总是1到1。Changes are not always 1 to 1. 例如,您可以从冲突会议时间更改为电子邮件时间,但由于可用筛选器变体的原因,不能进行相反的更改。For example, you can change from Conflicting meeting hours to Email hours, but because of variations in the available filters, the opposite change is not possible.

    如果选择了具有相同筛选器选项的新基本指标,指标将会更改,但你将不会看到任何其他更改。If you select a new base metric with identical filter options, the metric will change but you'll see no additional changes. 如果选择筛选器选项是其子集的新基本指标,则会显示其他可用筛选器。If you select a new base metric for which the filter options are a subset, additional available filters appear. 如果您编辑指标的名称,然后更改基本指标,则将删除您编辑的名称。If you edit the name of the metric and then change the base metric, the name that you edited is deleted.

  8. 在创建或编辑所需的所有指标后,请确认或取消您所做的更改:After you create or edit all the metrics you want, confirm or cancel your changes:

    • 如果选择 " 确认",则会保存对指标的所有更改。If you select Confirm, all changes to the metric are saved.
    • 如果选择 " 取消",则会放弃所有更改 (还原到原始状态) 。If you select Cancel, all changes are discarded (reverted to the original state).
    • 如果既不做确认也不取消更改,则会自动确认这些更改。If you neither confirm nor cancel the changes, the changes are automatically confirmed.
  9. 选择 " 运行 " 以运行包含所有已确认的指标和应用的自定义的查询。Select Run to run the query with all confirmed metrics and customizations that you applied.

NOT 运算符NOT operators

当您将 "NOT" 运算符与其他指标筛选器结合使用时,应小心谨慎。Care should be taken when you use the 'NOT' operator in conjunction with other metric filters. 例如,假设您想要添加一个查询筛选器,以排除主题行包含以下所有术语的所有会议:销售、会议和 office,通过使用 "NOT" 运算符。For example, suppose that you wanted to add a query filter to exclude all meetings where the subject line contained all the following terms: sales, meetings, and office, by using a ‘NOT’ operator.

假定会议电子邮件具有主题行: "销售会议",但还未包含术语 "office"。Assume that a meeting email had the subject line: “Sales meeting”, but did not also include the term 'office'. 在这种情况下,如果您要将 "NOT" 运算符与 "OR" 运算符一起使用,则仍将返回 corresponded 术语丢失的任何会议。In this case, if you were to use the ‘NOT’ operator in conjunction with the 'OR' operator, any meetings that corresponded to the missing term would still be returned. 如果要排除所有术语(而不只是其中的所有词),请使用 "AND",而不是 "OR" 运算符。If you want to exclude all the terms, not just any of them, use the 'AND' rather than the 'OR' operator. 否则,当不满足任何一个筛选条件时,将返回值。Otherwise, values will be returned when any one of the filter terms is not satisfied.