開始使用 Power BI DesktopGetting started with Power BI Desktop

歡迎使用 Power BI Desktop 使用者入門指南Welcome to the Power BI Desktop Getting Started Guide. 此 Power BI Desktop 簡短教學課程能讓您熟悉它的運作方式、示範它的功能,以及加速您建置穩固資料模型的能力 — 以及令人讚嘆的報表,增強您的商業智慧工作。This short tour of Power BI Desktop gets you acquainted with how it works, demonstrates what it can do, and accelerates your ability to build robust data models — along with amazing reports — that amplify your business intelligence efforts.

偏好觀看而不是閱讀嗎?Prefer to watch instead of read? 歡迎觀賞我們的使用者入門影片Feel free to take a look at our getting started video. 如果您想要跟著影片操作對應的範例資料,可以下載這個範例 Excel 活頁簿.And if you want to follow along with the video with matching sample data, you can download this sample Excel workbook.

Power BI Desktop 可讓您建立查詢、資料連線和報表的集合,輕鬆地與其他人共用。Power BI Desktop lets you create a collection of queries, data connections, and reports that can easily be shared with others. Power BI Desktop 整合經過實證的 Microsoft 技術 – 強大的查詢引擎、資料模型化和視覺化,還能與線上 Power BI 服務順暢地搭配運作.Power BI Desktop integrates proven Microsoft technologies – the powerful Query engine, data modeling, and visualizations – and works seamlessly with the online Power BI service.

結合 Power BI Desktop (分析師和其他人可在此建立功能強大的資料連線、模型和報表) 和 Power BI 服務 (Power BI Desktop 報表可在此共用,以便使用者檢視並與其互動),使新的深入資訊更容易從資料世界建立模型、建置、共用及擴充。With the combination of Power BI Desktop (where analysts and others can create powerful data connections, models and reports) and the Power BI service (where Power BI Desktop reports can be shared so users can view and interact with them), new insights from the world of data are easier to model, build, share, and extend.

資料分析師會發現 Power BI Desktop 是個功能強大、有彈性且高度可存取的工具,可以連接和塑造資料世界、建置穩固的模型,及製作結構良好的報表。Data analysts will find Power BI Desktop a powerful, flexible, and a highly accessible tool to connect with and shape the world of data, build robust models, and craft well-structured reports.

如何使用本指南How to use this guide

您可以使用好幾種方法使用本指南 – 掃描它以取得快速概觀,或閱讀每一節以充分了解 Power BI Desktop 的運作方式。You can use this guide in a couple of ways – scan it for a quick overview, or read through each section for a strong understanding of how Power BI Desktop works.

如果您趕時間,可以在幾分鐘內快速掃視本指南,並且能夠判斷 Power BI Desktop 運作方式及如何使用它。If you’re in a hurry you can do a visual sweep of this guide in just a couple minutes, and come away with a good sense of how Power BI Desktop operates, and how to use it. 本指南的大部分內容包含以視覺化方式示範 Power BI Desktop 運作方式的畫面。Most of this guide consists of screens that visually show how Power BI Desktop works.

若要更深入了解,您也可以閱讀每一節、執行步驟,然後帶著您自己的 Power BI Desktop 檔案,隨時都準備好張貼到 Power BI 服務,並與其他人共用。For a more thorough understanding you can read through each section, perform the steps, and walk away with your own Power BI Desktop file that’s ready to post onto the Power BI service, and share with others.

注意

另外還有個別且特製化版本的 Power BI,稱為 Power BI 報表伺服器,這適用於需要其資料和報告來保持內部部署的客戶。There is also a separate and specialized version of Power BI called Power BI Report Server, which is for customers who need their data and reporting to remain on-premises. 若要與該特定版本搭配使用,另外還有個別且特製化版本的 Power BI Desktop,稱為適用於 Power BI 報表伺服器的 Power BI Desktop,這只適用於Power BI 版本的報表伺服器。For use with that specialized version, there's also a separate and specialized version of Power BI Desktop called Power BI Desktop for Power BI Report Server, which works only with the Report Server version of Power BI. 本文描述標準 Power BI DesktopThis article describes the standard Power BI Desktop.

Power BI Desktop 的運作方式How Power BI Desktop works

使用 Power BI Desktop,您可以連接到資料 (通常是多個資料來源)、塑造資料 (使用能建立具洞察力、吸引人的資料模型的查詢),以及使用該模型來建立報表 (其他人可以運用、以其為基礎進行建置並共用)。With Power BI Desktop, you connect to data (usually multiple data sources), shape that data (with queries that build insightful, compelling data models), and use that model to create reports (which others can leverage, build upon, and share).

步驟都按照您的要求完成之後 – 連接、塑造和報告 – 您可以將該工作儲存成 Power BI Desktop 檔案格式,也是 .pbix 副檔名。When the steps are completed to your satisfaction – connect, shape, and report – you can save that work in Power BI Desktop file format, which is the .pbix extension. Power BI Desktop 檔案可像其他檔案一樣共用,但最好的 Power BI Desktop 檔案共用方式,是上傳 (共用) 到 Power BI 服務.Power BI Desktop files can be shared like any other file, but the most compelling way to share Power BI Desktop files is to upload them (share them) on the Power BI service.

Power BI Desktop 會集中、簡化並效率化設計與建立商業智慧儲存機制和報告的程序,這些程序在其他情況下可能散亂、不相關且棘手。Power BI Desktop centralizes, simplifies, and streamlines what can otherwise be a scattered, disconnected, and arduous process of designing and creating business intelligence repositories and reports.

準備好要試試?Ready to give it a try? 讓我們開始吧。Let’s get started.

安裝並執行 Power BI DesktopInstall and run Power BI Desktop

您可以從 Power BI 服務下載 Power BI Desktop,方法是選取齒輪 圖示,然後選取 [Power BI Desktop] 。You can download Power BI Desktop from the Power BI service, by selecting the gear icon, then select Power BI Desktop.

Power BI Desktop 會安裝為應用程式,並在您的桌面上執行。Power BI Desktop is installed as an application, and runs on your desktop.

當您執行 Power BI Desktop 時,會顯示「歡迎」 畫面。When you run Power BI Desktop, a Welcome screen is displayed.

您可以直接從 [歡迎] 畫面 (從左窗格中的連結) [取得資料]、查看 [最近使用的來源],或 [開啟其他報表]。You can Get Data, see Recent Sources, or Open Other Reports directly from the Welcome screen (from the links in the left pane). 如果關閉該畫面 (選取右上角的 x),會顯示 Power BI Desktop 的 [報表] 檢視。If you close the screen (select the x in the top right corner), the Report view of Power BI Desktop is displayed.

Power BI Desktop 中有三種檢視:[報表] 檢視、[資料] 檢視和 [關聯性] 檢視。There are three views in Power BI Desktop: Report view, Data view, and Relationships view. Power BI Desktop 也包含 [查詢編輯器],這會在另一個視窗中開啟。Power BI Desktop also includes Query Editor, which opens in a separate window. 在 [查詢編輯器] 中,您可以建立查詢並轉換資料,然後將調整過的資料模型載入 Power BI Desktop,並建立報表。In Query Editor, you can build queries and transform data, then load that refined data model into Power BI Desktop, and create reports.

下列畫面顯示 Power BI Desktop 左邊的三個檢視圖示:從上到下分別為 報表資料關聯性The following screen shows the three view icons along the left of Power BI Desktop: Report, Data, and Relationships, from top to bottom. 目前顯示的檢視會以左側的黃色列表示。The currently displayed view is indicated by the yellow bar along the left. 在本案例中,目前正在顯示 [報表] 檢視。In this case, Report view is currently displayed. 您可以選取這三個圖示中的任一個來變更檢視。You can change views by selecting any of those three icons.

安裝 Power BI Desktop 後,您就可以連接至資料、塑造資料,以及建置報表 (通常是依此順序)。With Power BI Desktop installed you’re ready to connect to data, shape data, and build reports (usually in that order). 在接下來的章節中,我們會依序介紹每一項。In the next few sections, we take a tour through each in turn.

連接到資料Connect to data

安裝 Power BI Desktop 後,您就可以連接至持續擴展的資料世界。With Power BI Desktop installed, you’re ready to connect to the ever expanding world of data. [查詢] 視窗中有「各式各樣」 的可用資料來源。There are all sorts of data sources available in the Query window. 下圖顯示如何藉由依序選取 [常用] 功能區 > [取得資料] > [其他] 來連線至資料The following image shows how to connect to data, by selecting the Home ribbon, then Get Data > More.

針對這個快速導覽,我們會連接到幾種不同的 Web 資料來源。For this quick tour, we'll connect to a couple different Web data sources.

想像您即將退休 – 您想要住在有很多陽光、稅制合理且具備良好健康照護的地方 – 或者也許您是資料分析師,您想要該資訊來協助您的客戶。Imagine you’re retiring – you want to live where there’s lots of sunshine, preferable taxes, and good health care – or perhaps you’re a data analyst, and you want that information to help your customers. 例如,也許您想要協助太陽眼鏡零售商訂最晴朗區域的目標銷售量。For example, perhaps you want to help your sunglasses retailer target sales where the sun shines most frequently.

無論如何,下列 Web 資源具有關於那些主題的相關和詳細資料:Either way, the following Web resource has interesting data about those topics, and more:

http://www.bankrate.com/finance/retirement/best-places-retire-how-state-ranks.aspxhttp://www.bankrate.com/finance/retirement/best-places-retire-how-state-ranks.aspx

選取 [取得資料] > [Web] 並貼上位址。Select Get Data > Web and paste the address.

當您選取 [確定] 時,Power BI Desktop 的 [查詢] 功能就會開始運作。When you select OK, the Query functionality of Power BI Desktop goes to work. 查詢會連絡 Web 資源,[導覽器] 視窗會傳回它在該網頁找到的資訊。Query contacts the Web resource, and the Navigator window returns what it found on that Web page. 在本案例中,它找到一個資料表 (資料表 0) 和整體的 Web 文件。In this case, it found a table (Table 0) and the overall Web Document. 我們對資料表有興趣,因此我們從清單中選取它。We’re interested in the table, so we select it from the list. [導覽器] 視窗會顯示預覽。The Navigator window displays a preview.

此時我們可以從視窗的底部選取 [編輯] ,先編輯查詢再載入資料表,或者我們可以載入資料表。At this point we can edit the query before loading the table, by selecting Edit from the bottom of the window, or we can load the table.

當我們選取 [編輯] 時,查詢編輯器會啟動,並顯示代表資料表的檢視。When we select Edit, Query Editor launches and a representative view of the table is presented. 此時會顯示 查詢設定 窗格 (若未顯示,可依序從功能區選取 檢視,然後選取 [顯示] > 查詢設定,以便顯示查詢設定 窗格)。The Query Settings pane is displayed (if it’s not, you can select View from the ribbon, then Show > Query Settings to display the Query Settings pane). 以下是其外觀。Here’s what that looks like.

如需如何連接至資料的詳細資訊,請參閱連接至 Power BI Desktop 中的資料For more information about connecting to data, see Connect to Data in Power BI Desktop.

在下一節中,我們會調整資料,使其符合我們的需求。In the next section, we adjust the data so it meets our needs. 調整連接資料的程序稱為「塑造」 資料。The process of adjusting connected data is called shaping data.

資料成形及合併Shape and combine data

既然我們已經連接到資料來源,我們需要調整資料以符合我們的需求。Now that we’ve connected to a data source, we need to adjust the data to meet our needs. 有時候調整表示「轉換」 資料,例如重新命名資料行或資料表、將文字變更為數字、移除資料列、將第一列設定為標題列等。Sometimes adjusting means transforming the data – such as renaming columns or tables, changing text to numbers, removing rows, setting the first row as headers, and so on.

Power BI Desktop 中的查詢編輯器能夠充分利用右鍵功能表,也會在功能區中提供可用的工作。The Query editor in Power BI Desktop makes ample use of right-click menus, in addition to having tasks available on the ribbon. 您可以在 [轉換] 功能區中選取的大多數功能,也可以透過以滑鼠右鍵按一下項目 (例如資料行),然後從顯示的功能表中進行選擇來加以存取。Most of what you can select in the Transform ribbon is also available by right-clicking an item (such as a column) and choosing from the menu that appears.

資料成形Shape data

當您在 查詢編輯器中塑造資料時,您會隨著 查詢編輯器 載入及呈現資料,提供逐步指示來調整資料 ( 查詢編輯器 會為您執行這項作業)。When you shape data in the Query Editor, you’re providing step-by-step instructions (that Query Editor carries out for you) to adjust the data as Query Editor loads and presents it. 原始資料來源不會受到影響,只有這個特定資料檢視會經調整或「經塑造」 。The original data source is not affected; only this particular view of the data is adjusted, or shaped.

查詢編輯器會記錄您指定的步驟 (例如重新命名資料表、轉換資料類型或刪除資料行),而且每次這個查詢連接到資料來源,都會執行這些步驟,因此資料一律會以您指定的方式來塑造。The steps you specify (such as rename a table, transform a data type, or delete columns) are recorded by Query Editor, and each time this query connects to the data source those steps are carried out so that the data is always shaped the way you specify. 每當您使用 Power BI Desktop 的查詢時,或任何人使用您的共用查詢,例如 Power BI 服務上的查詢,都會進行這個程序。This process occurs whenever you use the query in Power BI Desktop, or for anyone who uses your shared query, such as in the Power BI service. 系統會循序擷取 [查詢設定] 窗格之 [套用的步驟] 下的所有步驟。Those steps are captured, sequentially, in the Query Settings pane under Applied Steps.

下圖顯示已塑造查詢的 [查詢設定] 窗格,我們將於接下來幾個段落中逐一說明每個步驟。The following image shows the Query Settings pane for a query that has been shaped – we’ll go through each of those steps in the next few paragraphs.

讓我們回到我們的退休資料,我們藉由連接到 Web 資料來源來找到這資料,並塑造資料以符合我們的需求。Let’s get back to our retirement data, which we found by connecting to a Web data source, and shape that data to fit our needs.

特此告知入門者,大部分的評分是以整數帶入 [查詢編輯器] ,但並非全部都是 (有一個資料行會包含文字和數字,因此不會自動轉換)。For starters, most ratings were brought into Query Editor as whole numbers, but not all of them (one column contained text and numbers, so it wasn't automatically converted). 我們需要資料為數字。We need the data to be numbers. 沒問題,只要以滑鼠右鍵按一下資料行標頭,然後選取 [變更類型] > [整數],即可變更資料類型。No problem – just right-click the column header, and select Change Type > Whole Number to change the data type. 如果我們需要選擇多個資料行,可以先選取資料行,然後按住 SHIFT、選取其他相鄰的資料行,然後以滑鼠右鍵按一下資料行標頭,即可變更所有選取的資料行。If we needed to choose more than one column, we could first select a column then hold down SHIFT, select additional adjacent columns, and then right-click a column header to change all selected columns. 您也可以使用 CTRL 來選取非相鄰的資料行。You can also use CTRL to select non-adjacent columns.

您也可以使用 [轉換] 功能區,將那些資料行從文字變更 (或「轉換」 ) 成標頭。You can also change, or transform, those columns from text to header by using the Transform ribbon. 以下是 [轉換] 功能區,並且有箭頭指向 [資料類型] 按鈕,這個按鈕可讓您將目前的資料類型轉換成其他資料類型。Here’s the Transform ribbon, with an arrow pointing toward the Data Type button, which lets you transform the current data type to another.

請注意,在 [查詢設定] 中,[套用的步驟] 會反映已做的變更。Note that in Query Settings, the Applied Steps reflect the changes that were made. 如果我想要移除成形程序中的任何步驟,我只需選取該步驟,接著選取步驟左邊的 XIf I want to remove any step from the shaping process, I simply select that step, and then select the X to the left of the step.

我們需要再做一些變更,讓查詢位於我們想要的位置:We need to make a few more changes to get the query where we want it:

  • 移除第一個資料行 – 我們不需要它,它只包含指出「看看您那一州的退休評等」的重複資料列,這是 Web 資料表的成品Remove the first column – we don’t need it, it just includes redundant rows that say “Check out how your state ranks for retirement” which is an artifact of this being a Web based table
  • 修正一些錯誤 – 在網頁上,一個資料行有混合數字的文字 (某些州繫結在一個類別中)。Fix a few Errors – on the Web page, one column had text mixed in with the numbers (some states tied in one category). 那在該網站上很好,但並不適合我們的資料分析。That works well in the website, but not for our data analysis. (在此案例中) 錯誤很容易修正,並且示範 [查詢編輯器] 及其 [套用的步驟] 一些很棒的功能It's easy (in this case) to fix, and shows some cool features and capabilities of Query Editor and its Applied Steps
  • 變更資料表名稱 – 「資料表 0」 不是有用的描述元,但變更它很簡單Change the Table Name – that Table 0 is not a useful descriptor, but changing it simple

每個步驟於在 Power BI Desktop 中成形及合併資料中都有示範。Each of these steps is demonstrated in Shape and Combine Data in Power BI Desktop. 歡迎參閱該頁面,或繼續閱讀這份文件,了解您接下來要做什麼。Feel free to check out that page, or keep going in this document to see what you would do next. 下一節會在套用上述變更之後繼續。The next section picks up after the changes above are applied.

合併資料Combine data

有關各州的那份資料很有趣,而且適用於建立額外的分析工作和查詢。That data about various states is interesting, and will be useful for building additional analysis efforts and queries. 但是有一個問題:大多數資料使用兩個字母的縮寫州名代碼,而不是該州的完整名稱。But there’s one problem: most data out there uses a two-letter abbreviation for state codes, not the full name of the state. 我們需要某種方式來建立州名及其縮寫的關聯。We need some way to associate state names with their abbreviations.

我們很幸運:有另一個公用的資料來源可執行該項工作,但還需要進行相當多的塑造,才能予以連接到我們的退休資料表。We’re in luck: there’s another public data source that does just that, but it needs a fair amount of shaping before we can connect it to our retirement table. 以下是州名縮寫的 Web 資源:Here’s the Web resource for state abbreviations:

https://zh.wikipedia.org/wiki/美國各州縮寫列表http://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations

從 [查詢編輯器] 中的 [常用] 功能區,我們選取 [取得資料] > [Web] 並輸入位址,然後選取 [確定],[導覽器] 視窗便會顯示在該網頁上找到的資訊。From the Home ribbon in Query Editor, we select Get Data > Web and type the address, select OK, and the Navigator window shows what it found on that Web page.

我們選取 [資料表 [編輯]],因為其中包含我們要的資料,但仍需要進行相當多的成形,以便削減資料表的資料。We select Table[edit] because it includes the data we want, but it’s going to take quite a bit of shaping to pare that table’s data down. 每個步驟於在 Power BI Desktop 中成形及合併資料中也有示範。Each of these steps is also demonstrated in Shape and Combine Data in Power BI Desktop. 總結那些步驟,以下是我們做的事:To summarize those steps, here's what we do:

我們選取 [編輯] ,然後:We select Edit, then:

  • 移除前兩個資料列 – 其為建立網頁資料表時的產物,而我們不需要這兩個資料列。Remove the top two rows – they’re a result of the way that Web page’s table was created, and we don’t need them.
  • 移除底部 26 個資料列 – 這些全部是地區名稱,我們不需要將其包含在內。Remove the bottom 26 rows – they’re all the territories, which we don’t need to include.
  • 篩選掉華盛頓特區 – 退休統計資料的資料表不包含華盛頓特區,因此我們從清單中將其排除。Filter out Washington DC – the retirement stats table doesn't include DC, so we'll exclude it from our list.
  • 移除一些不必要的資料行 – 我們只需要將州對應到正式的雙字母縮寫,就可以移除其他資料行。Remove a few unneeded columns – we only need the mapping of state to its official two-letter abbreviation, so we can remove the other columns.
  • 使用第一個資料列作為標頭 - 由於我們移除了前三個資料列,因此目前的頂端列是我們要的標頭。Use the first row as headers – since we removed the top three rows, the current top row is the header we want.

    注意

    現在便是指出查詢編輯器中套用的步驟的「順序」很重要的時機,而且該順序可能會影響資料的成形方式。This is a good time to point out that the sequence of applied steps in Query Editor is important, and can affect how the data is shaped. 另外,也必須考慮一個步驟對另一個後續的步驟可能會有什麼影響;如果您從 [套用的步驟] 移除一個步驟,後續的步驟可能就不會和原本預期的行為一樣,這便是受到查詢步驟順序的影響。It’s also important to consider how one step may impact another subsequent step; if you remove a step from the Applied Steps, subsequent steps may not behave as originally intended, because of the impact of the query’s sequence of steps.

  • 重新命名資料行和資料表本身 – 一般會有幾種方式可以重新命名資料行,您可以選擇您偏好的方式。Rename the columns, and the table itself – as usual, there are a couple ways to rename a column, you can choose whichever you prefer.

StateCodes 資料表成形之後,我們可以將這兩個資料表或查詢合併成一個。由於現在的資料表是我們對資料套用查詢的結果,所以通常稱為查詢.With the StateCodes table shaped, we can combine these two tables, or queries, into one; since the tables we now have are a result of the queries we applied to the data, they’re often referred to as queries.

有兩個主要方式可合併查詢 – 「合併」 和「附加」 。There are two primary ways of combining queries – merging and appending.

當您有一或多個資料行要加入另一個查詢時,您可「合併」 查詢。When you have one or more columns that you’d like to add to another query, you merge the queries. 當您有其他資料列要加入現有的查詢時,您可「附加」 查詢。When you have additional rows of data that you’d like to add to an existing query, you append the query.

在本例中,我們想要合併查詢。In this case we want to merge queries. 首先,我們選取想讓其他查詢合併「進去」 的查詢,然後從功能區上的 [主資料夾] 索引標籤選取 [合併查詢] 。To get started, we select the query into which we want the other query to merge, then select Merge Queries from the Home tab on the ribbon.

[合併] 視窗隨即出現,提示我們選取哪一個資料表要合併到選取的資料表,然後選取要用於合併的相符資料行。The Merge window appears, prompting us to select which table we’d like merged into the selected table, and then, the matching columns to use for the merge. RetirementStats 資料表 (查詢) 選取 State ,然後選取 StateCodes 查詢 (在本案例中很容易,因為只有一個其他查詢 – 當您連接到許多資料來源時,會有許多查詢可從中選擇)。Select State from the RetirementStats table (query), then select the StateCodes query (easy in this case, since there’s only one other query – when you connect to many data sources, there are many queries to choose from). 當我們選取正確的相符資料行 – 來自 RetirementStatsState ,和來自 StateCodesState Name – [合併] 視窗外觀如下所示,且 [確定] 按鈕已啟用。When we select the correct matching columns – State from RetirementStats, and State Name from StateCodes – the Merge window looks like the following, and the OK button is enabled.

在查詢的結尾會建立 NewColumn ,它是與現有查詢合併的資料表 (查詢) 內容。A NewColumn is created at the end of the query, which is the contents of the table (query) that was merged with the existing query. 來自合併查詢的所有資料行會壓縮成 NewColumn,但您可以選擇 [展開] 資料表,並包含您要的任何資料行。All columns from the merged query are condensed into the NewColumn, but you can select to Expand the table, and include whichever columns you want. 若要展開合併的資料表,並選取要包含哪些資料行,請選取展開圖示 ()。To expand the merged table, and select which columns to include, select the expand icon (). [展開] 視窗隨即出現。The Expand window appears.

在本例中,我們只想要 State Code 資料行,因此我們只選取該資料行,然後選取 [確定] 。In this case, we only want the State Code column, so we select only that column and then select OK. 清除 [使用原始資料行名稱做為前置詞] 核取方塊,因為我們不需要也不想要它;如果我們保留選取它,則合併的資料行將名為 NewColumn.State Code (原始資料行名稱,或 NewColumn ,然後一個點,再來是帶入查詢的資料行名稱)。We clear the checkbox from Use original column name as prefix because we don’t need or want that; if we leave that selected, the merged column would be named NewColumn.State Code (the original column name, or NewColumn, then a dot, then the name of the column being brought into the query).

注意

想嘗試如何帶入 NewColumn 資料表嗎?Want to play around with how to bring in that NewColumn table? 您可以試驗一下,如果您不喜歡結果,只需要從 [查詢設定] 窗格中的 [套用的步驟] 清單刪除該步驟;您的查詢便會回到套用 [展開] 步驟之前的狀態。You can experiment a bit, and if you don’t like the results, just delete that step from the Applied Steps list in the Query Settings pane; your query returns to the state prior to applying that Expand step. 就像是個自由重做的機會,您可以不限次數地任意執行,直到展開程序看起來是您要的方式為止。It’s like a free do-over, which you can do as many times as you like until the expand process looks the way you want it.

我們現在有合併兩個資料來源的單一查詢 (資料表),其中每個資料來源都已經過塑造以符合我們的需求。We now have a single query (table) that combined two data sources, each of which has been shaped to meet our needs. 此查詢可以做為許多其他相關資料連線的基礎 – 例如任何州的住房成本統計資料、人口統計資料或工作機會。This query can serve as a basis for lots of additional, interesting data connections – such as housing cost statistics, demographics, or job opportunities in any state.

如需每種成形及合併資料步驟的更完整描述,請參閱在 Power BI Desktop 中成形及合併資料.For a more complete description of each of these shape and combine data steps, see Shape and Combine Data in Power BI Desktop.

現在我們有足夠的資料來建立一些相關報表,全都在 Power BI Desktop 內。For now, we have enough data to create a few interesting reports, all within Power BI Desktop. 由於這是一項里程碑,讓我們儲存這個 Power BI Desktop 檔案 – 我們稱它為「開始使用 Power BI Desktop」 。Since this is a milestone let’s save this Power BI Desktop file – we’ll call it Getting Started with Power BI Desktop. 若要在 [查詢編輯器] 套用變更,並載入 Power BI Desktop,請從 [常用] 功能區選取 [關閉並套用]。To apply the changes in Query Editor and load them into Power BI Desktop, select Close & Apply from the Home ribbon.

建置報表Build reports

載入資料表之後可以進行其他變更,且您可以重新載入模型來套用所做的任何變更。Additional changes can be made after the table is loaded, and you can reload a model to apply any changes you make. 但是目前這樣就夠了。But for now this will do. 在 Power BI Desktop [報表] 檢視中,您可以開始建立報表。In Power BI Desktop Report view, you can begin to build reports.

[報表] 檢視有五個主要區域:The Report view has five main areas:

  1. 功能區,顯示與報表和視覺效果相關聯的常見工作The ribbon, which displays common tasks associated with reports and visualizations
  2. [報表] 檢視或畫布,在這裡會建立和排列視覺效果The Report view, or canvas, where visualizations are created and arranged
  3. 底部的 [頁面] 索引標籤區域,可讓您選取或加入報表頁面The Pages tab area along the bottom, which lets you select or add a report page
  4. [視覺效果] 窗格,您可以在這裡變更視覺效果、自訂色彩或座標軸、套用篩選、拖曳欄位等等The Visualizations pane, where you can change visualizations, customize colors or axes, apply filters, drag fields, and more
  5. [欄位] 窗格,您可以在這裡將查詢項目和篩選拖曳至 [報表] 檢視,或拖曳至 [視覺效果] 窗格的 [篩選] 區域The Fields pane, where query elements and filters can be dragged onto the Report view, or dragged to the Filters area of the Visualizations pane

[視覺效果] 和 [欄位] 窗格可以摺疊,方法是選取邊緣上的小箭號,在 [報表] 檢視中提供更多的空間,以建置酷炫的視覺效果。The Visualizations and Fields pane can be collapsed by selecting the small arrow along the edge, providing more space in the Report view to build cool visualizations. 修改視覺效果時,您也會看到向上或向下的箭號,這分別表示您可以展開或摺疊該區段。When modifying visualizations, you'll also see these arrows pointing up or down, which means you can expand or collapse that section, accordingly.

若要建立視覺效果,只需要將欄位從 [欄位] 清單拖曳至 [報表] 檢視。To create a visualization, just drag a field from the Fields list onto the Report view. 在本案例中,讓我們來拖曳 RetirementStatsState 欄位,看看結果如何。In this case, let’s drag the State field from RetirementStats, and see what happens.

看看它...Power BI Desktop 會自動建立地圖式視覺效果,因為可辨識 State 欄位包含地理位置資料。Look at that... Power BI Desktop automatically created a map-based visualization, because it recognized that the State field contained geolocation data.

請注意,在 [視覺效果] 窗格中,我可以選取不同類型的視覺效果,而且在那些圖示下方的區域中,我可以將欄位拖曳到不同區域以套用圖例,或是修改視覺效果。Notice that in the Visualizations pane, I can select different types of visualizations, and in the area below those icons, I can drag fields to different areas to apply a Legend, or otherwise modify the visualization.

讓我們來往前快轉一下,看看 [報表] 檢視在加入一些視覺效果和一些新報表頁面之後的外觀。Let’s fast-forward a bit, and see what the Report view looks like after a handful of visualizations have been added, as well as a few new Report pages. 如需報表的詳細資訊,請參閱 Power BI Desktop 中的報表檢視For more information about reports, see Report View in Power BI Desktop.

第一個報表頁面提供的資料檢視方塊是根據「整體排名」 。The first Report page provides a perspective of the data based on Overall rank. 當我們選取其中一個視覺效果時,[欄位及篩選] 窗格會顯示選取的欄位,以及視覺效果的結構 (哪些欄位套用至 [共用軸] 、[資料行值] 和 [行值] )。When we select one of the visualizations, the Fields and Filters pane shows which fields are selected, and the structure of the visualization (which fields are applied to the Shared Axis, Column Values, and Line Values).

此報表中有六個 頁面 ,每個會將我們的資料中的特定項目視覺化。There are six Pages in this Report, each visualizing certain elements of our data.

  1. 第一頁,如上所示,顯示根據「整體排名」的所有州 。The first page, shown above, shows all states based on Overall rank.
  2. 第二頁著重在根據「整體排名」 的前十個州。The second page focuses on the top ten states based on Overall rank.
  3. 第三個頁面上,居住成本 (及相關聯的資料) 最佳的 10 個州會加上視覺效果。For the third page, the best 10 states for cost of living (and associated data) are visualized.
  4. 第四頁的焦點是天氣,篩選為 15 個最晴朗的州。Weather is the focus of the fourth page, filtered to the 15 sunniest states.
  5. 在第五個的頁面上,會針對前 15 個州將社區福利繪製圖表並視覺化。On the fifth page, Community well-being is charted and visualized for the top 15 states.
  6. 最後,也會視覺化犯罪統計資料,顯示最佳 (和最差) 的十個州。Lastly, crime statistics are visualized, showing the best (and well, the last) ten states.

以下是著重在居住成本的報表頁面外觀。Here’s what the cost of living-focused Report page looks like.

您可以建立各種相關報表和視覺效果。There are all sorts of interesting reports and visualizations you can create.

分享您的成果Share your work

既然我們已經有相當完整的 Power BI Desktop 報表,我們可以在 Power BI 服務與他人分享。Now that we have a Power BI Desktop report that’s reasonably complete, we can share it with others on the Power BI service. 有幾種方式可以在 Power BI Desktop 分享您的成果。There are a few ways to share your work in Power BI Desktop. 您可以發行至 Power BI 服務、直接從 Power BI 服務上傳 .pbix 檔案,或是儲存 .pbix 檔案,然後就像任何其他檔案一樣地傳送它。You can publish to the Power BI service, you can upload the .pbix file directly from the Power BI service, or you can save the .pbix file and send it like any other file.

首先,我們來看一下直接從 Power BI Desktop 發行至 Power BI 服務。First, let's look at publishing to the Power BI service directly from Power BI Desktop. 從 [常用] 功能區選取 [發行] 。On the Home ribbon, select Publish.

將提示您登入 Power BI。You may be prompted to sign in to Power BI.

當您已登入且發行程序已完成時,會看到下列對話方塊。When you've signed in and the publish process is complete, you see the following dialog.

當您登入 Power BI 時,您會在服務的 [儀表板] 、[報表] 和 [資料集] 區段看到您剛載入的 Power BI Desktop 檔案。When you sign in to Power BI, you'll see Power BI Desktop file you just loaded in the Dashboards, Reports, and Datasets sections of the service.

另一種分享成果的方式是從 Power BI 服務內載入它。Another way to share your work is to load it from within the Power BI service. 下列連結會在瀏覽器顯示 Power BI 服務:The following link brings up the Power BI service in a browser:

https://app.powerbi.com

選取 [取得資料] 會開始載入 Power BI Desktop 報表的程序。Select Get Data to start the process of loading your Power BI Desktop report.

[取得資料] 頁面隨即出現,您可以從中選取要從何處取得資料。The Get Data page appears, from which you can select where to get your data from. 在本案例中,我們從 [檔案] 方塊選取 [取得] 。In this case, we select Get from the Files box.

[檔案] 檢視隨即出現。The Files view appears. 在本案例中,我們選取 [本機檔案] 。In this case, we select Local File.

當您選取檔案時,Power BI 會將檔案上傳。When you select the file, Power BI uploads the file.

一旦檔案已上傳,您就可以在 Power BI 服務左窗格中的 [報表] 選取檔案。Once the file is uploaded, you can select the file from the Reports in the left pane of the Power BI service.

Power BI 服務會顯示報表的第一頁。The Power BI service displays the first page of the report. 在頁面的底部,您可以選取任何索引標籤,以顯示該報表的頁面。Along the bottom of the page, you can select any tab to display that page of the report.

您可以在 Power BI 服務中變更報表,方法是從報表畫布上方選取 [編輯報表] 。You can make changes to a report in the Power BI service by selecting Edit Report from the top of the report canvas.

若要儲存報表,請從服務選取 [檔案] > [另存新檔]To save your report, select File > Save As from the service. 您可以在 Power BI 服務中,從您的報表建立各種有趣的視覺效果;您可以將報表釘選到 儀表板There are all sorts of interesting visuals you can create in the Power BI service from your report, which you can pin to a dashboard. 若要了解 Power BI 服務中的儀表板,請參閱設計絕佳儀表板的秘訣.To learn about dashboards in the Power BI service, see Tips for designing a great dashboard.

儲存之後,選取主頁面上的 [共用] 圖示。Once saved, select the Share icon on the main page.

從這裡,您可以傳送電子郵件給同事,和他們共用儀表板。From here, you can send an email to colleagues with whom you’d like to share the dashboard.

如需有關建立、共用及修改儀表板的詳細資訊,請參閱共用儀表板For more information about creating, sharing, and modifying dashboards, see Share a dashboard.

您可以使用 Power BI Desktop 和 Power BI 服務來製作與資料相關的顯目混搭與視覺效果。There are all sorts of compelling data-related mash-ups and visualizations you can do with Power BI Desktop, and with the Power BI service. 如需詳細資訊,請查看下一節。Check out the next section for more information.

後續步驟Next steps

您可以使用 Power BI Desktop 執行各種作業。There are all sorts of things you can do with Power BI Desktop. 如需有關其功能的詳細資訊,請參閱下列資源:For more information on its capabilities, check out the following resources: