通过导入数据集创建新的 Power BI 报表Create a new Power BI report by importing a dataset

你已经阅读了 Power BI 中的报表,并且现在想要创建你自己的仪表板。You've read Reports in Power BI and now you want to create your own. 创建报表有许多不同的方式,在本文中,我们将通过从 Excel 数据集创建一个非常基本的报表开始。There are many different ways to create a report, and in this article we'll start by creating a very basic report from an Excel dataset. 了解创建报表的基础知识后,单击底部的下一步可转到更高级的报表主题。Once you understand the basics of creating a report, the Next steps at the bottom will direct you to more-advanced report topics.

提示:若要通过复制现有报表创建报表,请参阅复制报表TIP: To create a report by copying an existing report, see Copy a report

先决条件Prerequisites

  • Power BI 服务(有关使用 Power BI Desktop 创建报表的信息,请参阅 Desktop 报表视图Power BI service (for creating reports using Power BI Desktop, see Desktop report view
  • 零售分析示例数据集Retail Analysis sample dataset

导入数据集Import the dataset

此创建报表方法从数据集和空白报表画布开始。This method of creating a report starts with a dataset and a blank report canvas. 若要遵循此方法,请下载零售分析示例 Excel 数据集并将其保存到 OneDrive for Business(首选)或进行本地保存。To follow along, download the Retail Analysis sample Excel dataset and save it to OneDrive for Business (preferred) or locally.

  1. 我们将在 Power BI 服务的工作区中创建报表,因此,请选择现有工作区或新建一个工作区。We'll create the report in a Power BI service workspace, so select an existing workspace or create a new one.

  2. 在左侧导航窗格底部选择“获取数据”。From the bottom of the left navpane, select Get data.

  3. 选择“文件”并导航到你保存零售分析示例的位置。Select Files and navigate to the location where you saved the Retail Analysis sample.

  4. 对于此练习,请选择“导入”。For this exercise, select Import.

  5. 在导入数据集后,选择“查看数据集”。Once the dataset is imported, select View dataset.

  6. 查看数据集实际上将打开报表编辑器。Viewing a dataset actually opens the report editor. 你将看到一个空白画布和报表编辑工具。You'll see a blank canvas and the report editing tools.

提示:如果你不熟悉报表编辑画布,或需要刷新程序,则需要了解报表编辑器后才能继续。TIP: If you're unfamiliar with the report editing canvas, or need a refresher, Take a tour of the report editor before continuing.

向报表添加径向仪表Add a Radial Gauge to the report

在导入数据集后,我们来回答一些问题。Now that our dataset is imported, let's start answering some questions. 我们的首席营销官 (CMO) 想要知道我们距离本年度的销售目标还有多远。Our Chief Marketing Officer (CMO) wants to know how close we are to meeting this year's sales goals. 仪表是用于显示此类信息的一个不错的可视化效果选择A Gauge is a good visualization choice for displaying this type of information.

  1. 在“字段”窗格中,选择“销售额” > “本年度销售额” > “值”。In the Fields pane, select Sales > This Year Sales > Value.

  2. 从“可视化效果”窗格中,选择仪表模板,将视觉对象转换为仪表。Convert the visual to a Gauge by selecting the Gauge template from the VIsualizations pane.

  3. 将“销售额” > “本年度销售额” > “目标”拖动到“目标值”框。Drag Sales > This Year Sales > Goal to the Target value well. 似乎已经非常接近我们的目标。Looks like we're very close to our goal.

  4. 现在就可以保存报表了。Now would be a good time to save your report.

向报表添加区域图表和切片器Add an area chart and slicer to the report

CMO 还需要我们回答一些其他问题。Our CMO has some additional questions for us to answer. 她还希望了解本年度销售额与去年销售额的对比情况。She'd like to know how sales this year compare to last year. 而且她希望按地区查看结果。And, she'd like to see the findings by district.

  1. 首先,我们在画布上腾出一些空间。First, let's make some room on our canvas. 选择仪表,并将它移动到右上角。Select the Gauge and move it into the top-right corner. 然后拖拽任一角并使其变小。Then grab and drag one of the corners and make it smaller.
  2. 取消选中仪表。Deselect the gauge. 在“字段”窗格中,选择“销售额” > “本年度销售额” > “值”,然后选择“销售额” > “去年销售额”。In the Fields pane, select Sales > This Year Sales > Value and select Sales > Last Year Sales.

  3. 从“可视化效果”窗格中,选择区域图表模板 ,将视觉对象转换为区域图表。Convert the visual to an Area chart by selecting the Area chart template from the VIsualizations pane.
  4. 选择“时间” > “时间段”以将其添加到“轴”框。Select Time > Period to add it to the Axis well.

  5. 若要对可视化效果按时间段排序,请选择省略号,然后选择“按时间段排序”。To sort the visualization by time period, select the ellipses and choose Sort by Period.
  6. 现在添加切片器。Now let's add the slicer. 选择画布上的空白区域,然后选择切片器 模板。Select an empty area on the canvas and choose the Slicer template. 将在画布上添加空的切片器。This adds an empty slicer to our canvas.

  7. 从“字段”窗格中,选择“地区” > 地区”。From the Fields pane, select District > District. 移动切片器并重设切片器大小。Move and resize the slicer.

  8. 使用切片器按地区查找模式和见解。Use the slicer to look for patterns and insights by District.

继续浏览数据并添加可视化效果。Continue exploring your data and adding visualizations. 当你发现尤为值得关注的见解时,将它们固定到仪表板When you find especially interesting insights, pin them to a dashboard.

后续步骤Next steps