教程:Power BI 服务入门Tutorial: Get started with the Power BI service

本教程介绍了 Power BI 服务的一些功能 。This tutorial is an introduction to some of the features of the Power BI service. 在这里,你可连接到数据、创建报表和仪表板,并就你的问题提问。In it, you connect to data, create a report and a dashboard, and ask questions of your data. 你还可在 Power BI 服务中执行更多其他操作;本教程仅作激发兴趣之用。You can do much more in the Power BI service; this tutorial is just to whet your appetite. 要了解 Power BI 服务如何与其他 Power BI 产品/服务契合,建议阅读什么是 Power BIFor an understanding of how the Power BI service fits in with the other Power BI offerings, we recommend reading What is Power BI.

Power BI 服务主页

在本教程中,将完成以下步骤:In this tutorial, you complete the following steps:

  • 登录 Power BI Online 帐户或进行注册(如果还没有帐户)。Sign in to your Power BI online account, or sign up, if you don't have an account yet.
  • 打开 Power BI 服务。Open the Power BI service.
  • 获取一些数据并在报表视图中打开。Get some data and open it in report view.
  • 使用该数据创建可视化效果并将其另存为报表。Use that data to create visualizations and save it as a report.
  • 从该报表固定磁贴,创建仪表板。Create a dashboard by pinning tiles from the report.
  • 使用问答自然语言工具将其他可视化效果添加到仪表板。Add other visualizations to your dashboard by using the Q&A natural-language tool.
  • 在仪表板上重新排列磁贴、调整其大小并与之交互。Resize, rearrange, and interact with the tiles on the dashboard.
  • 删除数据集、报表和仪表板,清理资源。Clean up resources by deleting the dataset, report, and dashboard.


更喜欢可以自主掌控进度的免费培训课程?Prefer a free self-paced training course instead? 在 EdX 上注册学习我们的“数据分析和可视化”课程Enroll in our Analyzing and Visualizing Data course on EdX.

注册 Power BI 服务Sign up for the Power BI service

如果没有 Power BI 帐户,请先注册一个 Power BI Pro 免费试用版,再进行操作。If you don't have a Power BI account, sign up for a free Power BI Pro trial before you begin.

拥有帐户后,在浏览器中输入 app.powerbi.com 以打开 Power BI 服务 。After you have an account, enter app.powerbi.com in your browser to open the Power BI service.

步骤 1:获取数据Step 1: Get data

通常,需要创建 Power BI 报表时,会先使用 Power BI Desktop。Often when you want to create a Power BI report, you start in Power BI Desktop. 而这一次,我们将在 Power BI 服务中从头开始创建一个报表。This time, we're going to start from scratch creating a report in the Power BI service.

在本教程中,我们会从 CSV 文件中获取数据。In this tutorial, we get data from a CSV file. 想要跟着做吗?Want to follow along? 下载财务示例 CSV 文件Download the Financial Sample CSV file.

  1. 登录 Power BISign in to Power BI. 还没有帐户?Don’t have an account? 别担心,可以注册一个免费试用版。No worries, you can sign up for a free trial.

  2. Power BI 将在浏览器中打开。Power BI opens in your browser. 在导航窗格底部,选择“获取数据” 。Select Get data at the bottom of the nav pane.

    随即将打开“获取数据”页面 。The Get Data page opens.

  3. 在“创建新内容”部分下,选择“文件” 。Under the Create new content section, select Files.


  4. 选择“本地文件” 。Select Local file.


  5. 浏览到计算机上的该文件,然后选择“打开” 。Browse to the file on your computer, and choose Open.

  6. 在本教程中,我们会选择“导入”,将 Excel 文件添加为数据集,然后就可以使用它来创建报表和仪表板 。For this tutorial, we select Import to add the Excel file as a dataset, which we can then use to create reports and dashboards. 如果选择“上传”,则整个 Excel 工作簿都将上传至 Power BI,然后可以在 Excel Online 中打开它并进行编辑 。If you select Upload, the entire Excel workbook is uploaded to Power BI, where you can open and edit it in Excel online.


  7. 数据集准备就绪后,选择“数据集”,然后选择“财务示例”数据集旁边的“创建报表”,打开报表编辑器 。When your dataset is ready, select Datasets, then select Create report next to the dataset Financial sample to open the report editor.


    报表画布是空白的。The report canvas is blank. 我们看到右侧有“筛选器”、“可视化效果”和“字段”窗格 。We see the Filters, Visualizations, and Fields panes on the right.


  8. 请注意,顶部导航窗格上有“读取视图”选项 。Notice there's an option for Reading view on the top nav pane. 由于具有此选项,这意味着你当前处于“编辑视图”中。Because you have this option, that means you're currently in Editing view. 进行简要了解是熟悉报表编辑器的一个不错的方法。A great way to get familiar with the report editor is to take a tour.


    同时,在“编辑视图”中,可以创建和修改报表,因为你是报表的所有者 。While in Editing view, you can create and modify your reports, because you're the owner of the report. 也是创建者 。That is, you're a creator. 与同事共享报表时,他们只能在“阅读视图”中与报表交互,你的同事是使用者 。When you share your report with colleagues, they can only interact with the report in Reading view; your colleagues are consumers. 详细了解阅读视图和编辑视图Learn more about Reading view and Editing view.

步骤 2:在报表中创建图表Step 2: Create a chart in a report

连接到数据后,请开始浏览数据。Now that you've connected to data, start exploring. 发现有趣的内容后,可以创建仪表板来监视内容,并查看内容在不同时间的变化。When you've found something interesting, you can create a dashboard to monitor it and see how it changes over time. 我们来看看具体的工作方式。Let's see how that works.

  1. 在报表编辑器中,我们首先使用页面右侧的“字段”窗格生成可视化效果。 In the report editor, we start in the Fields pane on the right side of the page to build a visualization. 选中“销售总额”和“日期”复选框 。Select the Gross Sales and Date checkboxes.


    Power BI 会分析数据并创建可视化对象。Power BI analyzes the data and creates a visualization. 如果先选择“日期”,会看到一个表格 。If you selected Date first, you see a table. 如果先选择“销售总额”,则会看到一个柱形图 。If you selected Gross Sales first, you see a column chart.

  2. 切换到不同的数据显示方式。Switch to a different way of displaying your data. 让我们在折线图中查看此数据。Let's see this data as a line chart. 从“可视化对象”窗格中,选择折线图图标 。Select the line chart icon from the Visualizations pane.


  3. 看起来不错,让我们将它固定到仪表板 。This chart looks interesting, so let's pin it to a dashboard. 将鼠标悬停在可视化对象上,并选择固定图标。Hover over the visualization and select the pin icon. 固定此可视化对象时,它将存储在仪表板上并会不断更新,由此你可以大致跟踪最新值。When you pin this visualization, it's stored on your dashboard and kept up-to-date so you can track the latest value at a glance.


  4. 由于此报表是新建的,因此在可视化对象固定到仪表板之前,系统会提示保存。Because this report is new, you're prompted to save it before you can pin a visualization to a dashboard. 为报表命名(例如“一段时间内的销售额”),然后选择“保存” 。Give your report a name (for example, Sales over time), and then select Save.

  5. 选择“新建仪表板”,并将其命名为“教程用财务示例” 。Select New dashboard and name it Financial sample for tutorial.


  6. 选择“固定” 。Select Pin.

    会显示一条成功消息(右上角附近),告知你可视化效果已作为磁贴添加到你的仪表板中。A success message (near the top-right corner) lets you know the visualization was added as a tile to your dashboard.


  7. 选择“转至仪表板”来查看新建的仪表板,它包含一个以磁贴形式固定的折线图 。Select Go to dashboard to see your new dashboard with the line chart that you pinned to it as a tile.


  8. 在仪表板上选择新的磁贴,以便返回到报表。Select the new tile on your dashboard to return to the report. Power BI 会转回到报表的“阅读视图”。Power BI returns you to the report in Reading view.

  9. 要切换回“编辑视图”,请在顶部导航窗格中选择“更多选项”(…),然后选择“编辑” 。To switch back to Editing view, select More options (...) in the top nav pane > Edit. 回到“编辑视图”后,可继续探索并固定磁贴。Back in Editing view, you can continue to explore and pin tiles.


步骤 3:探索问答功能Step 3: Explore with Q&A

要快速浏览数据,请尝试问答问题框中提问。For a quick exploration of your data, try asking a question in the Q&A question box. 问答功能会创建有关你的数据的自然语言查询。Q&A creates natural-language queries about your data. 在仪表板中,问答框位于顶部(用于询问数据相关问题) 。In a dashboard, the Q&A box is at the top (Ask a question about your data). 在报表中,它位于顶部导航窗格中(用于提问) 。In a report, it's in the top nav pane (Ask a question).

  1. 要返回到仪表板,请在黑色“Power BI”栏中选择“我的工作区” 。To go back to the dashboard, select My workspace in the black Power BI bar.


  2. 在“仪表板”选项卡上,选择你的仪表板 。On the Dashboards tab, select your dashboard.


  3. 选择“询问数据相关问题” 。Select Ask a question about your data. 问答功能会自动提供多项建议。Q&A automatically offers a number of suggestions.



    如果看不到这些建议,请打开“新问答体验” 。If you don't see the suggestions, turn on New Q&A experience.

  4. 部分建议会返回一个值。Some of the suggestions return a single value. 例如,选择“最高销售额” 。For example, select maximum sale.

    问答功能会搜索答案,并以卡片可视化形式进行显示 。Q&A searches for an answer and presents it in the form of a card visualization.


  5. 选择“固定”图标Select the pin icon 固定图标 以在“教程用财务示例”仪表板上显示此可视化效果。to show this visualization on the Financial sample for tutorial dashboard.

  6. 向下滚动浏览“有助于入门的问题”列表,并选择“每月平均销售成本” 。Scroll down in the Questions to get you started list and select average cog for each month.


  7. 另请将条形图固定到“教程用财务示例”仪表板中 。Pin the bar chart to the Financial Sample for tutorial dashboard, too.

  8. 将光标放在问答框中“按月”的后面,然后键入“折线图” 。Place the cursor after by month in the Q&A box and type as line. 选择“折线图(可视化效果类型)” 。Select line (Visualization Type).


  9. 选择“退出问答” 以返回到仪表板,可在此处看到所创建的新磁贴。Select Exit Q&A to return to your dashboard, where you see the new tiles you created.


    你会看到,即使你已将图表更改为折线图,磁贴仍为条形图,这是因为它保持固定时的效果。You see that even though you changed the chart to a line chart, the tile remained a bar chart because that's what it was when you pinned it.

步骤 4:重新放置磁贴Step 4: Reposition tiles

仪表板很宽。The dashboard is wide. 可重新排列磁贴,以便更好地利用仪表板的空间。We can rearrange the tiles to make better use of the dashboard space.

  1. 将“销售总额”折线图的右下角向上拖动,直到它与“销售”磁贴等高,然后松开鼠标 。Drag the lower-right corner of the Gross Sales line chart tile upward, until it snaps at the same height as the Sales tile, then release it.


    现在,上面两个磁贴高度相同。Now the two tiles are the same height.


  2. 拖动“平均销售成“条形图磁贴,直到它在“销售总额”折线图下方大小合适 。Drag the Average of COGS bar chart tile until it fits under the Gross Sales line chart.

    现在效果更好。That looks better.


步骤 5:与磁贴进行交互Step 5: Interact with tiles

下面是要观察的最后一个交互操作,然后你将开始自行创建仪表板和报表。Here's one last interaction to observe, before you start making your own dashboards and reports. 选择不同的磁贴会呈现不同的结果。Selecting the different tiles delivers different results.

  1. 首先,选择从报表中固定的“销售总额”折线图磁贴 。First select the Gross Sales line chart tile you pinned from the report.

    Power BI 会在阅读视图中打开报表。Power BI opens the report in Reading view.

  2. 选择浏览器上的“后退”按钮。Select the browser back button.

  3. 现在选择在问答中创建的“平均销售成本”条形图磁贴 。Now select the Average of COGS bar chart tile you created in Q&A.

    Power BI 不会打开报表。Power BI doesn't open the report. 改为打开问答,这是因为你是在问答中创建此图表的。Q&A opens instead, because you created this chart there.

清理资源Clean up resources

完成本教程后,现可删除数据集、报表和仪表板。Now that you've finished the tutorial, you can delete the dataset, report, and dashboard.

  1. 在导航窗格中,确保自己位于“我的工作区” 。In the nav pane, make sure you're in My Workspace.

  2. 选择“数据集” 选项卡并找到本教程导入的数据集。Select the Datasets tab and locate the dataset you imported for this tutorial.

  3. 选择“更多选项”(…) >“删除” 。Select More options (...) > Delete.


    删除数据集时,会看到一则警告,它提示还将删除该数据集中的所有包含数据的报告和仪表板磁贴 。When you delete the dataset, you see a warning that All reports and dashboard tiles containing data from this dataset will also be deleted.

  4. 选择“删除” 。Select Delete.

后续步骤Next steps

可添加更多可视化效果磁贴并对磁贴进行重命名、重设大小、链接和重新定位,从而优化仪表板。Make dashboards even better by adding more visualization tiles and renaming, resizing, linking, and repositioning them.