创建 Power BI 仪表板的数据警报Set up data alerts for the Power BI dashboard

注意:本文属于将 PowerApps、Microsoft Flow 和 Power BI 与 SharePoint Online 结合使用的系列教程。Note: This article is part of a tutorial series on using PowerApps, Microsoft Flow, and Power BI with SharePoint Online. 请确保已阅读系列介绍,了解总体情况以及相关下载内容。Make sure you read the series introduction to get a sense of the big picture, as well as related downloads.

在此任务中,我们将在 Power BI 中添加警报,以便了解待审批项目的等待时间是否过长,并添加用于响应触发的警报的流。In this task we'll add an alert in Power BI to let us know if pending projects are taking too long to approve, and a flow that responds when that alert occurs. 有关警报的详细信息,请参阅 Power BI 服务中的数据警报For more information on alerts, see Data alerts in Power BI service.

第 1 步:创建警报Step 1: Create an alert

  1. 在 Power BI 服务中,打开在上一任务中创建的仪表板。In the Power BI service, open the dashboard you created in the last task.
  2. 在显示一个数字的数据卡上,单击或点击省略号 (...)。On the card with the single number, click or tap the ellipsis (. . .).

    “最长待审批天数”数据卡

  3. 单击或点击右上角的Click or tap 钟形图标.

    磁贴菜单

  4. 在右侧窗格中,单击或点击“添加警报规则”。In the right pane, click or tap Add alert rule.

    添加警报规则

  5. 查看可设置的警报选项,如警报应采用的运行频率。Look at the options that are available for alerts, such as how frequently an alert should run. 在“阈值”中输入值“25”,再单击或点击“保存并关闭”。Enter a value of 25 for Threshold, then click or tap Save and close.

    设置并保存警报阈值

即使 56 高于阀值 25,也不会立即触发警报。The alert won't fire right now even though 56 is above the threshold of 25. 警报将在数据更新时触发,我们将在对此方案进行端到端演练中介绍具体情况。It will fire when data is updated, which we'll see when we run through the scenario end-to-end.

警报触发后,Power BI 会向警报创建者发送电子邮件,下一步将介绍如何使用 Microsoft Flow 发送其他邮件。When the alerts fires, Power BI sends email to the creator of the alert, and we'll see how to send additional mail using Microsoft Flow, in the next step.

第 2 步:创建用于响应警报的流Step 2: Create a flow that responds to the alert

  1. 登录 flow.microsoft.com,依次单击或点击“服务”和“Power BI”。Sign into flow.microsoft.com, click or tap Services, then Power BI.

    Microsoft Flow 中的 Power BI

  2. 单击或点击“在触发 Power BI 数据警报时,向任何受众发送电子邮件”。Click or tap Send an e-mail to any audience when a Power BI data alert is triggered.

    在触发 Power BI 数据警报时发送电子邮件

  3. 单击或点击“使用此模板”。Click or tap Use this template.
  4. 如果尚未登录,请先登录 Outlook 和 Power BI,再单击或点击“继续”。If you're not already signed in, sign into Outlook and Power BI, then click or tap Continue.

    登录并继续操作

  5. 在“警报 ID”下拉列表中,选择“最长待审批天数的警报”。In the Alert Id drop-down list, select Alert for Max days pending approval.

    指定经触发器触发的警报

  6. 在“收件人”框中,输入有效的电子邮件地址。In the To box, enter a valid email address.

    指定电子邮件的收件人

  7. 单击或点击“编辑”,看看可以更新其他哪些字段。Click or tap Edit to see other fields that you can update.

    编辑警报电子邮件

  8. 在屏幕的右上角,依次单击“创建流”和“完成”。At the top right of the screen, click Create flow, then Done.

    “完成”按钮

我们将在对此方案进行端到端演练中介绍此流的运行情况。We will see this flow run when we run through the scenario end-to-end. 现在,我们将继续执行此方案的最后一项任务,即将 Power BI 报表嵌入 SharePoint。Now we'll move on to the last task in this scenario - embedding a Power BI report into SharePoint.

后续步骤Next steps

本系列教程的下一步是将 Power BI 项目报表嵌入 SharePoint OnlineThe next step in this tutorial series is to embed the Power BI project report in SharePoint Online.