立刻从 Excel 工作簿变为出色的报表From Excel workbook to stunning report in no time

你的经理在下班前想要查看有关你最新的销售数据以及上一市场活动影响的报表。Your manager wants to see a report on your latest sales figures combined with your last campaign impressions by the end of the day. 但最新数据位于各种第三方系统上以及便携式计算机上的文件中。But the latest data resides on various third party systems and on files in your laptop. 以前,创建视觉对象和设置报表格式需要几个小时。In the past it’s taken hours to create visuals and format a report. 你开始感到焦虑。You’re beginning to feel anxious.

别担心。No worries. 凭借 Power BI,你可以立刻创建出色的报表。With Power BI, you can create a stunning report in no time.

在此示例中,我们将从本地系统上传 Excel 文件、创建新报表,并将其与同事共享 - 所有操作均在 Power BI 内进行。In this example, we’ll upload an Excel file from a local system, create a new report, and share it with colleagues—all from within Power BI.

准备数据Prepare your data

让我们以一个简单的 Excel 文件作为示例。Let’s take a simple Excel file as an example. 在将 Excel 文件加载到 Power BI 之前,必须在平面表中组织数据。Before you can load your Excel file into Power BI, you must organize your data in a flat table. 这意味着每一列都包含相同的数据类型 - 例如,文本、日期、数字或货币。This means that each column contains the same data type--for example, text, date, number, or currency. 应该有一个标题行,但不应存在任何显示总数的列或行。You should have a header row, but there should not be any column or row that displays totals.

接下来,将数据格式设置为表格。Next, format your data as a table. 在 Excel 中,在主页选项卡上的样式组中,选择格式化为表In Excel, on the Home tab, in the Styles group, select Format as Table. 选择要应用到工作表的表格样式。Select a table style to apply to your worksheet. Excel 工作表现已准备好加载到 Power BI 中。Your Excel worksheet is now ready to load into Power BI.

将 Excel 文件上传到 Power BIUpload your Excel file into Power BI

Power BI 将连接到多个数据源,包括位于计算机上的 Excel 文件。Power BI connects to many data sources, including Excel files that live on your computer. 若要开始,请登录到 Power BI。To get started, sign in to Power BI. 如果还未注册,你可以免费注册If you haven’t signed up, you can do so for free.

你想要创建新仪表板。You want to create a new dashboard. 打开“我的工作区”,然后选择“新建”图标。Open My workspace and select the + Create icon.

选择“仪表板”,输入名称,然后选择“创建”。Select Dashboard, enter a name, and select Create. 随即显示新仪表板,但其中不包含任何数据。The new dashboard displays -- with no data.

选择左侧导航窗格底部的“获取数据”。At the bottom of the left navigation pane, select Get Data. 在“获取数据”页上,从“导入或连接到数据”下的“文件”框中选择获取On the Get Data page, under Import or Connect to Data, in the Files box, select Get.

在“文件”页中,选择本地文件On the Files page, select Local File. 导航到计算机上的 Excel 工作簿文件,然后选择它以加载到 Power BI 中。Navigate to the Excel workbook file on your computer and select it to load into Power BI. 选择“导入”。Select Import.

注意:若要按照本教程其余部分的说明进行操作,请使用财务示例工作簿NOTE: To follow along with the rest of this tutorial, use the Financial sample workbook.

生成报表Build your report

Power BI 导入 Excel 文件后,将开始生成报表。After Power BI imports your Excel file, start building your report. “你的数据集已就绪”消息出现后,选择“查看数据集”。When the Your dataset is ready message appears, select View dataset. Power BI 在“编辑”视图中打开并显示报表画布。Power BI opens in Editing view and displays the report canvas. “可视化效果”、“筛选器”和“字段”窗格位于右侧。On the right side are the Visualizations, Filters, and Fields panes.

请注意,你的 Excel 工作簿表数据将在“字段”窗格中显示。Notice that your Excel workbook table data appears in the Fields pane. 在表的名称下方,Power BI 会将列标题作为单个字段列出。Under the name of the table, Power BI lists the column headings as individual fields.

现在可以开始创建可视化效果。Now you can begin to create visualizations. 你的经理想要查看一段时间的利润。Your manager wants to see profit over time. 在“字段”窗格中,将利润拖动到报表画布。In the Fields pane, drag Profit to the report canvas. 默认情况下,Power BI 将显示条形图。Power BI displays a bar chart by default. 接下来,将日期拖动到报表画布。Next, drag Date to the report canvas. Power BI 将更新条形图以按日期显示利润。Power BI updates the bar chart to show profit by date.

提示:如果你的图表外观与你所期望的不同,请检查你的聚合。TIP: If your chart doesn't look like you expected, check your aggregations. 例如,在“值”上右键单击你刚才添加的字段,并确保数据以你期望的方式进行聚合。For example, in the Value well, right click the field you just added and make sure the data is being aggregated the way you'd like it to be. 在此示例中,我们使用 SumIn this example, we're using Sum.

你的经理想要知道哪个国家/地区的盈利最多。Your manager wants to know which countries are the most profitable. 使用地图可视化效果给她留下深刻印象。Impress her with a map visualization. 选择画布上的空白区域,然后只需从“字段”窗格中将国家/地区利润字段拖动到其中即可。Select a blank area on your canvas, and from the Fields pane, simply drag over the Country and then Profit fields. Power BI 将创建一个地图视觉对象,其中的气泡代表每个位置的相对利润。Power BI creates a map visual with bubbles representing the relative profit of each location.

怎么显示按产品和市场细分显示销售额的视觉对象呢?What about displaying a visual showing sales by product and market segment? 简单。Easy. 在“字段”窗格中,选择“销售额”、“产品”和“细分市场”字段旁边的复选框。In the Fields pane, select the checkboxes next to the Sales, Product and Segment fields. Power BI 将立即创建一个条形图。Power BI creates a bar chart instantly. 通过在“可视化效果”菜单中选择一个图标来更改图表的类型。Change the type of chart by choosing one of the icons in the Visualizations menu. 例如,将其更改为堆积条形图。For instance, change it to a Stacked Bar chart. 若要对图表进行排序,请选择省略号 (...) > 排序依据To sort the chart, select the ellipses (...) > Sort by.

将所有视觉对象固定到仪表板。Pin all of your visuals to your Dashboard. 现在便可以将其与同事共享。You’re ready to share it with your colleagues.

共享仪表板Share your dashboard

你想要与经理 Paula 共享仪表板。You want to share your dashboard with your manager, Paula. 你可以与任何具有 Power BI 帐户的同事共享仪表板和基础报表。You can share your dashboard and underlying report with any colleague who has a Power BI account. 他们可以与你的报表进行交互,但不能保存更改。They can interact with your report, but cannot save changes.

若要共享你的报表,可在仪表板顶部,选择共享To share your report, at the top of the dashboard, select Share.

Power BI 将显示“共享仪表板”页面。Power BI displays the Share Dashboard page. 在顶部区域中,输入收件人的电子邮件地址。In the top area, enter the email addresses of the recipients. 在下面的字段中添加消息。Add a message in the field below. 若要允许收件人将你的仪表板与他人共享,请选择允许收件人共享仪表板To allow recipients to share your dashboard with others, select Allow recipients to share your dashboard. 选择共享Select Share.

后续步骤Next steps