建立 Power BI 報告來分析專案Create a Power BI report to analyze projects

注意:這篇文章是搭配 SharePoint Online 使用 PowerApps、Microsoft Flow 及 Power BI 之教學課程系列的一部分。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.

在這個工作中,我們將根據兩個 SharePoint 清單來建立 Power BI 報告。In this task, we'll create a Power BI report based on the two SharePoint lists. 我們將清單資料帶入 Power BI Desktop 並且稍微做一些清除、進行一些基本資料模型化,以及建立一組視覺效果來說明資料。We'll bring the list data into Power BI Desktop and clean it up a little, do some basic data modeling, and create a set of visuals that tell us something about the data.

提示:此案例的下載套件包括此報告的已完成版本:project-analysis.pbix。Tip: The download package for this scenario includes a finished version of this report: project-analysis.pbix.

Power BI Desktop 的快速檢閱Quick review of Power BI Desktop

在我們深入了解建立報告之前,讓我們檢閱 Power BI Desktop。Before we dive into report creation, let's review Power BI Desktop. 這是功能強大的工具,具有許多功能,因此我們將著重在您在這項工作中使用之區域的概觀。This is a powerful tool, with a lot of features, so we will focus on an overview of the areas that you will use in this task. Power BI Desktop 中有三個主要工作區或檢視:報告檢視、資料檢視和關聯性檢視。There are three main work areas or 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 左側的三個檢視圖示:報告資料關聯性,從上到下。The following screen shows the three view icons along the left of Power BI Desktop: Report, Data, and Relationships, from top to bottom. 左側的黃色列表示目前的檢視,在此案例中,顯示 [報告] 檢視。The yellow bar along the left indicates the current view; in this case, Report view is displayed. 藉由選取三個圖示任何一個來變更檢視。Change views by selecting any of those three icons.

Power BI Desktop 檢視

[報告] 檢視有五個主要區域: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 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.

Power BI Desktop 索引標籤、檢視和窗格

[資料] 檢視有三個主要區域:The Data view has three main areas:

  1. 功能區,具有以下選取的 [模型化] 索引標籤。The ribbon, which has the Modeling tab selected below. 您可以在此索引標籤上建立計算的資料表和資料行,並且對資料模型進行其他變更。On this tab, you create calculated tables and columns, and make other changes to the data model.
  2. 中央窗格,顯示選取之資料表的資料。The center pane, which shows data for the selected table.
  3. [欄位] 窗格,您在其中控制欄位在報告中的顯示方式。The Fields pane, where you control how fields are displayed in your reports.

Power BI Desktop 資料檢視

我們在這項工作中不使用 [關聯性] 檢視,但是您可以在稍後我們將清單資料帶入 Power BI Desktop 之後查看。We don't use the Relationships view in this task, but you can check it out later after we bring the list data into Power BI Desktop.

在 [查詢編輯器] 中,您建立查詢並轉換資料,然後將調整過的資料模型載入 Power BI Desktop。In Query Editor, you build queries and transform data, then load that refined data model into Power BI Desktop. [查詢編輯器] 有四個主要區域:Query Editor has four main areas:

  1. 功能區,有許多成形和轉換您帶入之資料的選項。The ribbon, which has many options for shaping and transforming the data that you bring in.
  2. 左窗格,列出查詢的位置,可用於選取、檢視及成形。The left pane, where queries are listed and available for selection, viewing, and shaping.
  3. 中央窗格,顯示來自選取之查詢的資料,可用於成形。The center pane, where data from the selected query is displayed and available for shaping.
  4. [查詢設定] 視窗,列出查詢的屬性和已套用的資料轉換步驟。The Query Settings window, which lists the query's properties and data transform steps that have been applied.

Power BI Desktop 查詢編輯器

步驟 1:將資料載入 Power BI DesktopStep 1: Get data into Power BI Desktop

在此步驟中,我們將先連線到兩個清單。In this step, we'll first connect to the two lists. 然後藉由移除資料分析不需要的資料行,來清除資料。Then we'll clean up the data by removing columns we don't need for our data analysis. 我們也會變更部分剩餘資料行的資料類型,使計算正常運作。We'll also change the data types on some of the remaining columns so that calculations work properly. 如需在 Power BI Desktop 中取得及清除資料的詳細資訊,請參閱引導式學習課程的取得資料一節。For more information on getting and cleaning data in Power BI Desktop, see the Getting Data section in our Guided Learning course.

連線至 SharePoint 清單Connect to SharePoint lists

  1. 在 Power BI Desktop 中,在 [首頁] 索引標籤上,按一下或點選 [取得資料],然後按一下或點選 [更多…]。In Power BI Desktop, on the Home tab, click or tap Get Data, then More…

    取得資料

  2. 在 [取得資料] 對話方塊中,按一下或點選 [SharePoint Online 清單],然後按一下或點選 [連線]。In the Get Data dialog box, click or tap SharePoint Online List, then Connect.

    連線至 SharePoint 清單

  3. 輸入 SharePoint 網站的 URL,然後按一下或點選 [確定]。Enter the URL for your SharePoint site, then click or tap OK.

    SharePoint 清單 URL

  4. 如果出現下列對話方塊,請確定您已經使用正確的認證登入,然後按一下或點選 [連線]。If you get the following dialog box, make sure you're signed in with the right credentials, then click or tap Connect.

    SharePoint 清單認證

  5. 選取 [專案詳細資料] 和 [專案要求],然後按一下或點選 [編輯]。Select Project Details and Project Requests, then click or tap Edit.

    選取 SharePoint 清單

    清單現在會顯示為 [查詢編輯器] 中的資料表。The lists are now displayed as tables in Query Editor.

    查詢編輯器中的資料表

從資料表移除不需要的資料行Remove unnecessary columns from the tables

  1. 在左側瀏覽窗格中,按一下或點選 [專案詳細資料]。In the left navigation pane, click or tap Project Details.
  2. 在中間窗格中,選取 [FileSystemObjectType] 資料行,然後按一下或點選 [移除資料行]。In the middle pane, select the FileSystemObjectType column, then click or tap Remove Columns.

    移除資料行

  3. 移除 [識別碼] 資料行後面的兩個資料行:[ServerRedirectedEmbedURL] 和 [ContentTypeId]。Remove the two columns after the Id column: ServerRedirectedEmbedURL and ContentTypeId. 提示:使用 Shift 鍵以同時選取兩個資料行,然後按一下或點選 [移除資料行]。Tip: use the Shift key to select both columns, then click or tap Remove Columns.
  4. 移除 [PMAssigned] 資料行右邊的所有資料行 (總計 22 個資料行)。Remove all columns to the right of the PMAssigned column (a total of 22 columns). 資料表應符合下列映像:The table should match the following image:

    查詢編輯器中的專案詳細資料資料表

  5. 重複您針對 [專案詳細資料] 進行的步驟,並且移除 [已核准] 資料行右邊的所有資料行 (總計 22 個資料行)。Repeat the process you went through for Project Details, and remove all columns to the right of the Approved column (a total of 22 columns). 資料表應符合下列映像:The table should match the following image:

     <span data-ttu-id="b8ce2-168">查詢編輯器中的專案要求資料表</span><span class="sxs-lookup"><span data-stu-id="b8ce2-168">Project Requests table in Query Editor</span></span>

變更專案詳細資料資料行的資料類型Change the data type on Project Details columns

  1. 選取 [ProjectedDays] 資料行,按一下或點選 [資料類型:任何],然後按一下或點選 [整數]。Select the ProjectedDays column, click or tap Data Type: Any, then Whole Number.

    將資料類型變更為整數

  2. 針對 [ActualDays] 資料行重複前一個步驟。Repeat the previous step for the ActualDays column.
  3. 選取 [ApprovedDate] 資料行,按一下或點選 [資料類型:任何],然後按一下或點選 [日期]。Select the ApprovedDate column, click or tap Data Type: Any, then Date.

     <span data-ttu-id="b8ce2-174">將資料類型變更為日期</span><span class="sxs-lookup"><span data-stu-id="b8ce2-174">Change data type to date</span></span>

  4. 針對 [ProjectedStartDate] 和 [ProjectedEndDate] 資料行重複前一個步驟。Repeat the previous step for the ProjectedStartDate and ProjectedEndDate columns.

變更專案要求資料行的資料類型Change the data type on Project Requests columns

  1. 選取 [EstimatedDays] 資料行,按一下或點選 [資料類型:任何],然後按一下或點選 [整數]。Select the EstimatedDays column, click or tap Data Type: Any, then Whole Number.
  2. 選取 [RequestDate] 資料行,按一下或點選 [資料類型:任何],然後按一下或點選 [日期]。Select the RequestDate column, click or tap Data Type: Any, then Date.

套用及儲存變更Apply and save changes

  1. 在 [首頁] 索引標籤上,按一下 [關閉並套用] 以關閉 [查詢編輯器],然後返回主要 Power BI Desktop 視窗。On the Home tab, click Close and Apply to close Query Editor and go back to the main Power BI Desktop window.

    關閉並套用變更

  2. 按一下或點選 [檔案],然後按一下或點選 [儲存],使用名稱 project-analysis.pbix 儲存。Click or tap File, then Save, and save with the name project-analysis.pbix.

步驟 2:改善資料模型Step 2: Improve the data model

現在,我們已經將資料從 SharePoint 清單提取到 Power BI Desktop,我們將繼續進行資料模型化。Now that we have the data from our SharePoint lists pulled into Power BI Desktop, we'll move on to data modeling. 資料模型化是費時的程序,但是我們簡要向您示範一些有趣的作業,您可以執行以取得更多 Power BI Desktop 中的清單資料:Data modeling can be a time-consuming process, but we'll briefly show you some interesting things you can do to get more out of the list data in Power BI Desktop:

  • 變更兩個資料表彼此相關的方式Change how the two tables are related to each other
  • 新增日期資料表,我們就可以根據工作日來計算Add a date table so we can make calculations based on weekdays
  • 新增計算的資料行來計算專案里程碑之間的時間範圍Add calculated columns to calculate timespans between project milestones
  • 新增量值以計算專案的預計與實際天數之間的差異Add measures to calculate variance in projected versus actual days for a project

這些步驟都完成之後,我們可以建置視覺效果,這些視覺效果會利用模型的改善。After these steps are complete, we can build visualizations that take advantage of the improvements to our model. 如需在 Power BI Desktop 中模型化資料的詳細資訊,請參閱引導式學習課程的模型化一節。For more information on modeling data in Power BI Desktop, see the Modeling section in our Guided Learning course.

變更資料表關聯性Change table relationships

當 Power BI Desktop 將清單帶入時,它會根據兩個資料表的 [識別碼] 資料行,建立彼此之間的關聯性。When Power BI Desktop brought the lists in, it created a relationship between them based on the Id column in both tables. 關聯性應該實際介於 [專案要求] 資料表的 [識別碼] 資料行,與 [專案詳細資料] 資料表的 [RequestId] 資料行之間。The relationship should actually be between the Id column in the Project Requests table, and the RequestId column in the Project Details table. 讓我們修正這個問題:Let's fix that:

  1. 按一下或點選 [資料檢視] 圖示。Click or tap the Data view icon.

    資料檢視

  2. 在 [模型化] 索引標籤上,按一下或點選 [管理關聯性]。On the Modeling tab, click or tap Manage Relationships. 我們會停留在 [資料] 檢視的此索引標籤上,以進行所有資料模型化步驟。We'll stay on this tab in the Data view for all the data modeling steps.

    管理關聯性

  3. 請確定已選取現有的關聯性,按一下或點選 [刪除],然後再次按一下或點選 [刪除] 以確認。Make sure the existing relationship is selected, click or tap Delete, then Delete again to confirm.

    刪除關聯性

  4. 按一下 [新增] 以建立不同的關聯性。Click New to create a different relationship.
  5. 在 [建立關聯性] 對話方塊中:In the Create Relationship dialog box:

    1. 針對第一個資料表,選取 [專案要求],和 [識別碼] 資料行。For the first table, select Project Requests, and the Id column.
    2. 針對第二個資料表,選取 [專案詳細資料],和 [RequestId] 資料行。For the second table, select Project Details, and the RequestId column.
    3. 畫面看起來應該像下列映像。The screen should look like the following image. 當您準備好時,按一下或點選 [確定]。When you're ready, click or tap OK.

      建立關聯性

新增日期資料表讓以日期為基礎的計算更簡單Add a date table to make date-based calculations easier

  1. 按一下或點選 [新增資料表]。Click or tap New Table.

    新增資料表

  2. 將下列公式輸入至公式列:Dates = CALENDARAUTO()Enter this formula into the formula bar: Dates = CALENDARAUTO().

    具有 Dates = CALENDARAUTO() 的公式列

    此公式會建立稱為 [日期] 的資料表,具有單一日期資料行。This formula creates a table called Dates with a single date column. 資料表涵蓋其他資料表的所有日期,如果新增其他日期會自動更新 (亦即,如果資料重新整理)。The table covers all dates from your other tables and updates automatically if additional dates are added (i.e. if data is refreshed).

    這個公式和本節中的其他公式使用 Data Analysis Expressions (DAX),這是一種適用於 Power BI 和其他技術的公式語言。This formula and the other ones in this section use Data Analysis Expressions (DAX), a formula language for Power BI and other technologies. 如需詳細資訊,請參閱 Power BI Desktop 的 DAX 基本概念For more information, see DAX basics in Power BI Desktop.

  3. 按下 Enter 鍵來建立 [日期] 資料表。Press Enter to create the Dates table.

    日期資料表

將導出的資料行新增至日期資料表Add a calculated column to the Dates table

  1. 依然在日期資料表上,按一下或點選 [新增資料行]。While still on the date table, click or tap New Column.

    新增資料行

  2. 將下列公式輸入至公式列:IsWeekDay = SWITCH(WEEKDAY(Dates[Date]), 1,0,7,0,1)Enter this formula into the formula bar: IsWeekDay = SWITCH(WEEKDAY(Dates[Date]), 1,0,7,0,1).

    這個公式會決定 [日期] 資料行中的日期是否為工作日。This formula determines whether a date in the Date column is a weekday. 如果日期為工作日,[IsWeekDay] 資料行會取得值 1,否則它會取得值 0。If the date is a weekday, the IsWeekDay column gets a value of 1; otherwise it gets a value of 0.

  3. 按下 Enter 鍵將 [IsWeekDay] 資料行新增至 [日期] 資料表。Press Enter to add the IsWeekDay column to the Dates table.

    新增 IsWeekDay 資料行

將導出的資料行新增至專案詳細資料資料表Add a calculated column to the Project Details table

  1. 在右窗格中,按一下或點選 [專案詳細資料] 資料表,然後按一下或點選 [新增資料行]。In the right pane, click or tap the Project Details table, then New Column.

    新增資料行

  2. 將下列公式輸入至公式列:Enter this formula into the formula bar:

    ApprovedStartDiff = CALCULATE(SUM(Dates[IsWeekday]),
    
       DATESBETWEEN(Dates[Date],
    
          'Project Details'[ApprovedDate],
    
          'Project Details'[ProjectedStartDate]
    
      )
    
    )
    

    此公式會計算當專案已核准與當它預計啟動之間的差異,以天為單位。This formula calculates the difference in days between when a project was approved and when it is projected to start. 它會使用 [日期] 資料表的 [IsWeekday] 資料行,因此它只會計算工作天。It uses the IsWeekday column from the Dates table, so it counts only weekdays.

  3. 按下 Enter 鍵將 [ApprovedStartDiff] 資料行新增至 [專案詳細資料] 資料表。Press Enter to add the ApprovedStartDiff column to the Project Details table.

    新增 ApprovedStartDiff 資料行

將導出的資料行新增至專案要求資料表Add a calculated column to the Project Requests table

  1. 在右窗格中,按一下或點選 [專案要求] 資料表,然後按一下或點選 [新增資料行]。In the right pane, click or tap the Project Requests table, then New Column.

    新增資料行

  2. 將下列公式輸入至公式列:Enter this formula into the formula bar:

    RequestDateAge = CALCULATE(SUM(Dates[IsWeekday]),
    
       DATESBETWEEN(Dates[Date],
    
          'Project Requests'[RequestDate],
    
          NOW()
    
       )
    
    )
    

    此公式會計算專案已要求與今天日期 (NOW()) 之間的差異,以天為單位。This formula calculates the difference in days between when a project was requested and today's date (NOW()). 同樣地,公式只會計算工作日。Again, the formula counts only weekdays. 此資料行是用來尋找已擱置最久的專案。This column is used to look for the project that has been pending the longest.

  3. 按下 Enter 鍵將 [RequestDateAge] 資料行新增至 [專案要求] 資料表。Press Enter to add the RequestDateAge column to the Project Requests table.

    新增 RequestDateAge 資料行

將量值新增至專案詳細資料資料表Add a measure to the Project Details table

  1. 在右窗格中,按一下或點選 [專案詳細資料] 資料表,然後按一下或點選 [新增量值]。In the right pane, click or tap the Project Details table, then New Measure.

    新增量值

  2. 將下列公式輸入至公式列:Enter this formula into the formula bar:

    VarProjectedActual = DIVIDE(
    
        SUM('Project Details'[ActualDays]) - SUM('Project Details'[ProjectedDays]),
    
        SUM('Project Details'[ProjectedDays])
    
    )
    

    此公式會計算專案實際和預計天數之間的差異。This formula calculates the variance between actual and projected days for a project. 我們將這個項目新增為量值,而非導出的資料行,以便傳回正確的結果,不論在報告中資料如何篩選或彙總。We add this as a measure, rather than a calculated column, so it returns the correct results regardless of how the data is filtered or aggregated in a report.

  3. 按下 Enter 鍵將 [VarProjectedActual] 量值新增至 [專案詳細資料] 資料表。Press Enter to add the VarProjectedActual measure to the Project Details table.

    新增 VarProjectedActual 量值

將量值新增至專案要求資料表Add a measure to the Project Requests table

  1. 在右窗格中,按一下或點選 [專案要求] 資料表,然後按一下或點選 [新增量值]。In the right pane, click or tap the Project Requests table, then New Measure.

    新增量值

  2. 將下列公式輸入至公式列:Enter this formula into the formula bar:

    MaxDaysPending = MAXX(
    
        FILTER('Project Requests', 'Project Requests'[Approved]="Pending"),
    
        'Project Requests'[RequestDateAge]
    
    )
    

    此公式會根據我們先前定義的導出資料行,尋找已擱置最久的專案。This formula finds the project that has been pending the longest, based on the calculated column we defined earlier.

  3. 按下 Enter 鍵將 [MaxDaysPending] 量值新增至 [專案要求] 資料表。Press Enter to add the MaxDaysPending measure to the Project Requests table.

    新增 MaxDaysPending 量值

步驟 3:建立報告視覺效果Step 3: Create report visualizations

現在我們來到許多人在想到資料分析時會想起的步驟:建立視覺效果,讓我們可以在資料中找到模式。Now we're at the step that many people think of when they think of data analysis: creating visualizations so we can find patterns in our data. 在此步驟中,我們將建立四個視覺效果:In this step, we'll create four visualizations:

  • 直條圖,顯示專案的預計天數與實際天數A column chart that shows projected days versus actual days on projects
  • 直條圖,顯示每個專案的差異A column chart that shows the variance for each project
  • 卡片,顯示已擱置最久的專案A card that shows the project that has been pending the longest
  • 資料表,顯示專案核准和預計開始日期之間的時間A table that shows the time between project approval and projected start date

在 Power BI Desktop 中建立這些報告視覺效果之後,我們會將資料和報告發佈至 Power BI 服務,讓我們可以建立並共用儀表板。After we've created these report visualizations in Power BI Desktop, we'll publish the data and reports to the Power BI service, so we can create and share dashboards. 如需在 Power BI Desktop 中建立報告的詳細資訊,請參閱引導式學習課程的視覺效果一節。For more information on creating reports in Power BI Desktop, see the Visualizations section in our Guided Learning course.

建立橫條圖以顯示預計與實際Create a bar chart to show projected versus actual

  1. 按一下或點選 [報告] 檢視圖示。Click or tap the Report view icon. 在 Power BI Desktop 中的其他時間都會停留在這個檢視。We'll stay in this view for the rest of our time in Power BI Desktop.

    報告檢視

  2. 在右側的 [視覺效果] 窗格中,按一下或點選 [叢集直條圖]。In the Visualizations pane on the right, click or tap Clustered column chart.

    視覺效果 - 叢集直條圖

  3. 從 [欄位] 窗格的 [專案詳細資料] 將 [PMAssigned] 和 [標題] 拖曳至 [視覺效果] 窗格中的 [座標軸]。Drag PMAssigned and Title from Project Details in the Fields pane to Axis in the Visualizations pane.

    視覺效果窗格中的座標軸

  4. 從 [欄位] 窗格的 [專案詳細資料] 將 [ActualDays] 和 [ProjectedDays] 拖曳至 [視覺效果] 窗格中的 [值]。Drag ActualDays and ProjectedDays from Project Details in the Fields pane to Value in the Visualizations pane.

    視覺效果窗格中的值

  5. 視覺效果現在看起來應該類似下列映像。The visualization should now look like the following image.

    依據 PMAssigned 的 ProjectedDays 和 ActualDays

  6. 從 [欄位] 窗格的 [專案詳細資料] 將 [狀態] 拖曳至 [視覺效果] 窗格的 [篩選] 區域,然後選取 [已完成] 核取方塊。Drag Status from Project Details in the Fields pane to the Filters area of the Visualizations pane, then select the Completed check box.

    依狀態資料行篩選

    圖表現在會篩選為只顯示已完成的專案,這樣才有意義,因為我們要比較預計天數與實際天數。The chart is now filtered to show only completed projects, which makes sense because we are comparing projected days to actual days.

  7. 按一下圖表左上角的箭號,將專案經理和專案的階層上移和下移。Click the arrows in the upper left corner of the chart to move up and down the hierarchy of project managers and projects. 在以下映像中,您會看到向下鑽研至專案的外觀。In the following image, you see what the drill down into projects looks like.

    向下鑽研直條圖

建立橫條圖以顯示預計的差異Create a bar chart to show variance from projected

  1. 按一下或點選您剛才建立之視覺效果外的畫布。Click or tap on the canvas outside the visualization you just created.
  2. 在右側的 [視覺效果] 窗格中,按一下或點選 [叢集直條圖]。In the Visualizations pane on the right, click or tap Clustered column chart.

    視覺效果 - 叢集直條圖

  3. 從 [欄位] 窗格的 [專案詳細資料] 將 [PMAssigned] 和 [標題] 拖曳至 [視覺效果] 窗格中的 [座標軸]。Drag PMAssigned and Title from Project Details in the Fields pane to Axis in the Visualizations pane.

    視覺效果窗格中的座標軸

  4. 從 [欄位] 窗格的 [專案詳細資料] 將 [VarProjectedActual] 拖曳至 [視覺效果] 窗格中的 [值]。Drag VarProjectedActual from Project Details in the Fields pane to Value in the Visualizations pane.

    視覺效果窗格中的值

  5. 從 [欄位] 窗格的 [專案詳細資料] 將 [狀態] 拖曳至 [視覺效果] 窗格的 [篩選] 區域,然後選取 [已完成] 核取方塊。Drag Status from Project Details in the Fields pane to the Filters area of the Visualizations pane, then select the Completed check box.

    依狀態資料行篩選

    視覺效果現在看起來應該類似下列映像。The visualization should now look like the following image.

    依據 PMAssigned 的 VarProjectedActual

    您可以從這個圖表看到由 Irvin Sayers 與 Joni Sherman 所執行的專案有多大的差異。You can see from this chart how much more variability there is for projects that were run by Irvin Sayers versus Joni Sherman. 向下鑽研以查看依據專案的差異,以及預計天數比實際天數多或少。Drill in to see the variability by project, and whether the days projected was more or less than the actual days.

    依據標題的 VarProjectedActual

  6. 在我們建立更多視覺效果之前,移動您已建立之視覺效果並且調整大小,讓它們能夠適當並排。Before we create more visualizations, move and resize the ones you already created, so they fit side-by-side.

    調整圖表並排

建立卡片,顯示最久的擱置專案Create a card that shows the longest pending project

  1. 按一下或點選您剛才建立之視覺效果外的畫布。Click or tap on the canvas outside the visualization you just created.
  2. 在右側的 [視覺效果] 窗格中,按一下或點選 [卡片]。In the Visualizations pane on the right, click or tap Card.

    視覺效果 - 卡片

  3. 從 [欄位] 窗格的 [專案要求] 將 [MaxDaysPending] 拖曳至 [視覺效果] 窗格中的 [欄位]。Drag MaxDaysPending from Project Requests in the Fields pane to Fields in the Visualizations pane.

    視覺效果窗格中的欄位

  4. 按一下或點選 [格式] (滾筒刷),然後將 [框線] 設為 [開啟]。Click or tap Format (paint roller), then set Border to On.

    複製格式 - 框線

  5. 將 [標題] 設為 [開啟],然後新增標題「待核准的最大天數」。Set Title to On, then add the title "Max days pending approval".

    新增標題

    視覺效果現在看起來應該類似下列映像。The visualization should now look like the following image.

     <span data-ttu-id="b8ce2-316">待核准的最大天數</span><span class="sxs-lookup"><span data-stu-id="b8ce2-316">Max days pending approval</span></span>

    我們發佈此報告之後,如果擱置專案的最大值達到特定臨界值,將會使用此圖格以觸發警示。After we publish this report, we'll use this tile to trigger an alert if the maximum value for a pending project reaches a certain threshold.

建立資料表,顯示專案核准和預計開始日期之間的時間Create a table that shows the time between project approval and projected start date

  1. 按一下或點選您剛才建立之視覺效果外的畫布。Click or tap on the canvas outside the visualization you just created.
  2. 在右側的 [視覺效果] 窗格中,按一下或點選 [資料表]。In the Visualizations pane on the right, click or tap Table.

    視覺效果 - 資料表

  3. 從 [欄位] 窗格的 [專案詳細資料] 將 [PMAssigned]、[標題] 和 [ApprovedStartDiff] 拖曳至 [視覺效果] 窗格中的 [值]。Drag PMAssigned, Title, and ApprovedStartDiff from Project Details in the Fields pane to Values in the Visualizations pane.

    視覺效果窗格中的值

  4. 從 [欄位] 窗格的 [專案詳細資料] 將 [ProjectedStartDate] 拖曳至 [視覺效果] 窗格的 [篩選] 區域,然後選取 [(空白)] 以外的所有日期。Drag ProjectedStartDate from Project Details in the Fields pane to the Filters area of the Visualizations pane, then select all dates except for (Blank).

    依據 ProjectedStartDate 篩選

  5. 調整資料表資料行的大小,您就可以看到所有資料。Resize the columns of the table so you can see all the data. 視覺效果現在看起來應該類似下列映像。The visualization should now look like the following image.

    具有 ApprovedStartDiff 值的資料表

  6. 按一下或點選 [ApprovedStartDiff] 的向下箭號,然後按一下或點選 [平均],我們就可以看到專案核准與預計開始日期之間的平均持續時間。Click or tap the down arrow for ApprovedStartDiff, then click or tap Average, so we can see the average duration between project approval and projected start date.

    計算平均值

  7. 再次按一下或點選 [ApprovedStartDiff] 的向下箭號,然後按一下或點選 [設定格式化的條件]。Click or tap the down arrow for ApprovedStartDiff again, then click or tap Conditional formatting.

    設定格式化的條件

  8. 使用預設設定,然後按一下 [確定]。Use the default settings and click OK.

    設定格式化的條件選項

    視覺效果現在看起來應該類似下列映像。The visualization should now look like the following image.

    已完成設定格式化的條件

    如您所見,Irvin Sayers 執行的專案通常會在核准之後許久才開始。As you can see, projects that Irvin Sayers runs tend to start a lot later after approval. 可能有指派經理之外的因素,但是這也值得一探究竟。There could be factors other than the assigned manager, but this would be worth looking into.

接著來到報告章節的結尾,根據從 SharePoint 匯入並且在 Power BI Desktop 中清除及模型化的資料,您現在應該有完整的報告。That brings us to the end of the report section, and you should now have a complete report based on data imported from SharePoint and cleaned up and modeled in Power BI Desktop. 如果一切都按照計劃,您的報告看起來應該如以下映像。If everything went according to plan, your report should look like the following image.

已完成的報告

後續步驟Next steps

此教學課程系列的下一個步驟是發佈 Power BI 專案報告並且建立儀表板The next step in this tutorial series is to publish the Power BI project report and create a dashboard.