視覺效果Visualizations

視覺效果可將您的資料帶入生活之中,並顯露出唯有吸引人且令人驚訝的視覺呈現方式所能展現的深入解析。Visualizations bring your data to life, and reveal insights that only compelling and amazing visual representations can. Power BI 引導式學習的本章會示範如何開始加以使用。This section of Power BI Guided Learning shows you how to get started using them.

您將學到如何...

Power BI 的視覺效果簡介Introduction to visuals in Power BI

歡迎使用 Power BI 引導式學習課程的<視覺效果>一節。Welcome to the Visualizations section of the Guided Learning course for Power BI. 準備開始進行好玩有趣且具啟發性的導覽,學習 Power BI 目前所提供的許多視覺效果。Get ready for a fun, interesting, and enlightening tour of the many, many visualizations Power BI has to offer. 而且不止這些,還有更多視覺效果將不斷推出!And this isn't all of them - there are more visualizations coming all the time!

當然,視覺效果是任何商業智慧工作的最終結果... 我們想要擷取資料、以吸引人且深入的方式呈現,並 顯示 重點部分。Power BI 提供各式各樣吸引人的視覺效果,自訂方式幾乎沒有限制,因此這是很重要的一節!Of course, visuals are the end-result of any business intelligence undertaking... we want to take data, present it in a compelling and insightful way, and show what stands out. And Power BI has all sorts of compelling visuals - and a nearly limitless way to customize them - so this is an important section!

本節似乎有許多主題,但別擔心︰每個主題都很簡短,並提供您想得到的所有視覺效果,而且很容易吸收。It might seem like there are lots of topics in this section, but don't worry: each topic is short, filled with (you guessed it) visuals, and easy to absorb. 您可能會發現自己悠遊於本節中,想像如何讓這些視覺效果呈現自己的資料。You'll likely find yourself cruising through this section, and imagining how you'll make these visuals present your own data.

我們將會從視覺效果的主要功能開始,也就是我們都很熟悉的簡單視覺效果,請務必了解所有細節。We'll start with the mainstays of visualizations - the simple visuals we're all familiar with - and make sure you know the ins and outs. 接著,我們將會探索更進階 (或至少較不常見) 的功能,並填滿您用來建立報表的工具箱。Then we'll get more advanced, or at least a little less common, and fill up your report-creating toolbox.

請盡情享受,您可以在此學到許多內容!Have fun - there's a lot to learn here!

Power BI 的視覺效果簡介Introduction to visuals in Power BI

視覺化資料是 Power BI 的其中一個核心部分 (我們在本課程稍早將其定義為基本建置組塊),而建立視覺效果是尋找及分享您深入解剖析的最簡單方式。Visualizing data is one of the core parts of Power BI - a basic building block as we defined it earlier in this course - and creating visuals is the easiest way to find and share your insights.

Power BI 預設提供一套完整的視覺效果,從簡單的橫條圖到圓形圖到地圖,甚至是更難理解的供應項目,例如瀑布圖、漏斗圖、量表圖等等。Power BI has a whole range of visualizations available by default, from simple bar charts to pie charts to maps, and even more esoteric offerings like waterfalls, funnels, gauges, and more. Power BI Desktop 也提供廣泛的頁面格式化工具 (例如圖案和影像),可協助讓報表更生動。Power BI Desktop also offers extensive page formatting tools, such as shapes and images, that help bring your report to life.

建立和自訂簡單的視覺效果Create and customize simple visualizations

在本文中,您將了解如何建立新的橫條圖、圓形圖和矩形式樹狀結構圖,以及如何配合您的報表加以自訂。In this article you learn how to create new bar charts, pie charts, and treemaps, and customize them to suit your reports.

有兩種不同的方式,可讓您在 Power BI Desktop 中建立新的視覺效果︰There are two different ways to create a new visualization in Power BI Desktop:

  • 您可以將欄位名稱從 [欄位] 窗格拖放到報表畫布。You can drag field names from the Fields pane, and drop them on the report canvas. 您的視覺效果預設會顯示為資料表。By default your visualization appears as a table of data.

  • 您也可以在 [視覺效果] 窗格中,按一下您要建立的視覺效果類型。You can also click the type of visualization you want to create in the Visualizations pane. 使用此方法時,預設視覺效果會是類似您選取之視覺效果類型的空白預留位置。With this method, the default visual is a blank placeholder that resembles the type of visual you selected.

建立圖形、地圖或圖表之後,您可以開始將資料欄位拖曳到 [視覺效果] 窗格下半部,以建立及組織您的視覺效果。Once you create your graph, map, or chart, you can begin dragging data fields onto the bottom portion of the Visualization pane to build and organize your visual. 可用的欄位會隨著您選取的視覺效果類型而改變。The available fields will change based on the type of visualization that you selected. 當您拖放資料欄位時,您的視覺效果會自動更新以反映變更。As you drag and drop data fields, your visualization will automatically update to reflect changes.

您可以調整視覺效果的大小,方法是選取視覺效果,然後向內或向外拖曳控點。您也可以將視覺效果移至畫布上的任何位置,方法是按一下後再拖曳視覺效果。You can resize your visualization by selecting it and then dragging the handles in or out. You can also move your visualization anywhere on the canvas by clicking and then dragging it. 如果您想要在不同的視覺效果類型之間進行轉換,請選取您要變更的視覺效果,然後只要從 [視覺效果] 窗格中的圖示選取不同的視覺效果即可。If you want to convert between different types of visualizations, select the visual you want to change and simply select a different visual from the icons in the Visualization pane. Power BI 會嘗試將您選取的欄位盡可能轉換成類似的新視覺效果類型。Power BI attempts to convert your selected fields to the new visual type as closely as possible.

當您將滑鼠停留在部分視覺效果時,您會看到包含該區段詳細資料的工具提示,例如標籤和總值。As you hover over parts of your visualizations, you'll get a tooltip that contains details about that segment, such as labels and total value.

在 [視覺效果] 窗格中,選取畫刷圖示對視覺效果進行外觀變更,例如背景對齊、標題文字和資料色彩。Select the paintbrush icon on the Visualizations pane to make cosmetic changes to your visual, such as background alignment, title text, and data colors.

對視覺效果進行外觀變更的可用選項會因您選取的視覺效果類型而異。The available options for cosmetic changes to your visual vary depending on the type of visual you have selected.

組合圖Combination charts

當您想要視覺化具有不同刻度的兩個量值時 (例如收益和單位),同時顯示不同軸刻度之線條和直條的組合圖會很有用。When you want to visualize two measures that have very different scales, such as revenue and units, a combination chart that shows a line and a bar with different axis scales is very useful. Power BI 預設支援許多不同類型的組合圖,包括熱門的折線圖堆疊直條圖Power BI supports many different types of combination charts by default, including the popular Line and Stacked Columns charts.

當您建立組合圖時,您會有一個 [共用軸] (X 軸) 欄位,以及兩個欄位的值 (在本例中為直條圖和折線圖)。When you create a combination chart, you're presented with a field for Shared Axis (the X-axis), and then values for your two fields, in this case a column and a line. 兩個 Y 軸圖例會分別出現在視覺效果的兩側。The two Y-axis legends appear on either side of the visualization.

您也可以依類別分割每個直條圖,方法是將類別拖曳到 [視覺效果] 窗格的 [直條圖數列] 欄位。You can also split each column by category, by dragging a category into the Column Series field in the Visualizations pane. 當您這麼做時,每個直條會根據每個類別中的值依比例著色。When you do so, each bar is proportionately colored based on the values within each category.

組合圖可讓您有效地以單一視覺效果視覺化具有不同刻度的多個量值。Combination charts are an effective way to visualize multiple measures that have very different scales in a single visualization.

交叉分析篩選器Slicers

交叉分析篩選器是其中一個最強大的視覺效果類型,特別適用於複雜的報表。Slicers are one of the most powerful types of visualizations, particularly as part of a busy report. 交叉分析篩選器Power BI Desktop 中畫布上的視覺效果篩選,可讓檢視報表的任何人依特定值分割資料,例如依年或依地理位置。A slicer is an on-canvas visual filter in Power BI Desktop that lets anyone looking at a report segment the data by a particular value, such as by year or by geographical location.

若要將交叉分析篩選器加入報表,請從 [視覺效果] 窗格選取 [交叉分析篩選器]。To add a slicer to your report, select Slicer from the Visualizations pane.

將分割所要依據的欄位拖放到交叉分析篩選器預留位置上方。Drag the field by which you want to slice and drop it top of the slicer placeholder. 視覺效果會變成具有核取方塊的項目清單。The visualization turns into a list of elements with checkboxes. 這些項目就是您的篩選 - 選取其中一個區段旁邊的方塊,便會根據您的選擇,篩選或 分割 相同報表頁面上的所有其他視覺效果。These elements are your filters - select the box next to one to segment, and all other visualizations on the same report page are filtered, or sliced, by your selection.

您可以使用幾個不同的選項來格式化交叉分析篩選器。There are a few different options available to format your slicer. 您可以將它設定為接受一次進行多個輸入,或切換為 [單一選取] 模式來一次使用一個。You can set it to accept multiple inputs at once, or toggle Single Select mode to use one at a time. 您也可以新增 [全選] 選項至交叉分析篩選器項目,當您有特別長的清單時,這會很有幫助。You can also add a Select All option to your slicer elements, which is helpful when you have a particularly long list. 將交叉分析篩選器的方向從預設的垂直變更為水平,就會變成選取列,而不是檢查清單。Change the orientation of your slicer from the vertical default to horizontal, and it becomes a selection bar rather than a checklist.

地圖視覺效果Map visualizations

Power BI 有兩種不同的地圖視覺效果類型︰泡泡地圖會在地理位置上方放置一個泡泡,而形狀地圖會實際顯示您要視覺化的區域形狀。Power BI has two different types of map visualizations: a bubble map that places a bubble over a geographic point, and a shape map that actually shows the outline of area you want to visualize.

注意

使用國家或地區時,請使用三個字母的縮寫,以確保地理編碼在地圖視覺效果中運作正常。When working with countries or regions, use the three-letter abbreviation to ensure that geocoding works properly in map visualizations. 請「不要」使用兩個字母的縮寫,因為可能無法正確辨識某些國家或地區。Do not use two-letter abbreviations, as some countries or regions may not be properly recognized. 如果您只有兩個字母的縮寫,請參閱此外部部落格文章,以了解如何將兩個字母的國家/地區縮寫與三個字母的國家/地區縮寫產生關聯的步驟。If you only have two-letter abbreviations, check out this external blog post for steps on how to associate your two-letter country/region abbreviations with three-letter country/region abbreviations.

建立泡泡地圖Create bubble maps

若要建立泡泡地圖,請在 [視覺效果] 窗格中,選取 [地圖] 選項。To create a bubble map, select the Map option in the Visualization pane. 您必須在 [視覺效果] 選項的 [位置] 值區中新增一個值,才能使用地圖視覺效果。You must add a value to the Location bucket in the Visualizations options to use a map visual.

Power BI 對於能接受的位置值類型很有彈性,從更一般的詳細資料 (例如城市名稱或機場代碼),到非常特定的緯度和經度資料。Power BI is flexible about what type of location value it accepts, from more general details like city name or airport code, down to very specific latitude and longitude data. 將欄位新增至 [大小] 貯體,即可依欄位變更每個地圖位置的泡泡大小。Add a field to the Size bucket to change the size of the bubble accordingly for each map location.

建立形狀地圖Create shape maps

若要建立形狀地圖,請在 [視覺效果] 窗格中,選取 [區域分布圖] 選項。To create a shape map, select the Filled Map option in the Visualization pane. 如同泡泡地圖,您必須在 [位置] 值區中新增一個值,才能使用此視覺效果。As with bubble maps, you must add some kind of value to the Location bucket to use this visual. 將欄位新增至 [大小] 貯體,即可依欄位變更填滿色彩的濃度。Add a field to the Size bucket to change the intensity of the fill color accordingly.

視覺效果左上角的警告圖示指出地圖需要更多位置資料,才能正確地繪製值。A warning icon in the top left corner of your visual indicates that the map needs more location data to accurately plot values. 這是在位置欄位中的資料模稜兩可時特別常見的問題,例如使用「華盛頓」等可能表示州或行政區的區域名稱。This is a particularly common problem when the data in your location field is ambiguous, such as using an area name like Washington that could indicate a state or a district. 解決此問題的一個方法是將資料行重新命名為更具體的名稱,例如「州」。One way to resolve this problem is to rename your column to be more specific, such as State. 解決此問題的另一個方法是選取 [模型] 索引標籤中的 [資料類別],手動重設資料類別。您可以在此指派資料的類別,例如「州」或「城市」。Another way to resolve it is to manually reset the data category by selecting Data Category in the Modeling tab. From there you can assign a category to your data such as "State" or "City".

矩陣和資料表Matrixes and tables

除了豐富的圖表之外,Power BI Desktop 還支援更多的表格式視覺效果。In addition to an abundance of charts, Power BI Desktop also supports more tabular visualizations. 事實上,當您擷取某個類別欄位或文字欄位並拖曳到報表畫布時,預設會取得資料表結果。In fact, when you grab a categorical field or text field and drag it onto the report canvas, you get a table of results by default. 您可以向上及向下捲動資料表,一開始會依字母順序排序。You can scroll up and down through the table, and initially it will be sorted alphabetically.

如果資料表中有數值資訊 (例如收益),最下方會顯示總和。If you have numerical information in a table, such as revenue, a total sum will appear at the bottom. 您可以按一下資料行的標題,切換為遞增或遞減順序,來手動排序每個資料行。You can manually sort by each column by clicking on its header to toggle ascending or descending order. 如果資料行的寬度不足以顯示所有內容,請按一下並左右拖曳標題將它展開。If a column is not wide enough to display all of its contents, click and drag the header sideways to expand it.

[視覺效果] 窗格之 [值] 值區中的欄位順序,決定這些欄位在資料表中的顯示順序。The order of the fields in the Values bucket in the Visualizations pane determines the order in which they appear in your table.

矩陣類似於資料表,但其資料行和資料列的標題類別不同。A matrix is similar to a table, but it has different category headers on the columns and rows. 如同資料表,數值資訊會自動加總並顯示在矩陣的右下方。As with tables, numerical information will be automatically totaled along the bottom and right side of the matrix.

矩陣有許多外觀選項可用,例如自動調整資料行大小、切換資料列和資料行總計、設定色彩等等。There are many cosmetic options available for matrixes, such as auto-sizing columns, toggling row and column totals, setting colors, and more. 建立矩陣時,請確定的您類別資料 (非數字資料) 位於矩陣左方且數值檔案位於右方,以確保水平捲軸會出現且捲動行為可正常運作。When creating a matrix, make sure your categorical data (the non-number data) is on the left of the matrix, and the numeric files on the right to ensure the horizontal scroll bar appears, and to make sure that scrolling behavior works properly.

散佈圖Scatter charts

如果您想要比較兩個不同的量值 (例如單位銷售額與收益的比較),散佈圖是常用的視覺效果。If you want to compare two different measures, such as unit sales verses revenue, a common visualization to use is a scatter chart.

若要建立空白圖表,請從 [視覺效果] 窗格選取 [散佈圖]。To create a blank chart, select Scatter chart from the Visualizations pane. 將您要比較的兩個欄位從 [欄位] 窗格拖放到 [X 軸] 和 [Y 軸] 選項值區。Drag and drop the two fields you want to compare from the Fields pane to the X Axis and Y Axis options buckets. 此時,散佈圖可能只會在視覺效果中央出現一個小泡泡;您需要在 [詳細資料] 值區中新增一個量值,以指出您要分割資料的方式。At this point, your scatter chart probably just has a small bubble in the center of the visual - you need to add a measure to the Details bucket to indicate how you would like to segment your data. 例如,若要比較項目銷售額和收益,或許您想要依類別、製造商或每月銷售額來分割資料。For example, if are comparing item sales and revenue, perhaps you want to split the data by category, or manufacturer, or month of sale.

在 [圖例] 值區中新增一個額外的欄位即可根據欄位的值以色彩編碼您的泡泡。Adding an additional field to the Legend bucket color-codes your bubbles according to the field's value. 您也可以在 [大小] 值區中新增一個欄位,以根據該值改變泡泡大小。You can also add a field to the Size bucket to alter the bubble size according to that value.

散佈圖也有許多視覺格式設定選項,例如開啟每個彩色泡泡的外框,以及切換個別標籤。Scatter charts have many visual formatting options as well, such as turning on an outline for each colored bubble and toggling individual labels. 您也可以變更其他圖表類型的資料色彩。You can change the data colors for other chart types, as well.

您可以在 [播放軸] 值區中,新增一個以時間為基礎的欄位,以建立泡泡圖在一段時間內變化的動畫。You can create an animation of your bubble chart's changes over time by adding a time-based field to the Play Axis bucket. 在動畫期間按一下泡泡即可查看其路徑軌跡。Click on a bubble during an animation to see a trace of its path.

注意

請記住,如果您在散佈圖中只看到一個泡泡,這是因為 Power BI 正在彙總您的資料,這是預設行為。Remember, if you only see one bubble in your scatter chart, it's because Power BI is aggregating your data, which is the default behavior. 在 [視覺效果] 窗格的 [詳細資料] 值區中新增一個類別,以取得更多泡泡。Add a category to the Details bucket, in the Visualizations pane, to get more bubbles.

瀑布圖和漏斗圖Waterfall and funnel charts

瀑布圖和漏斗圖是 Power BI 中所包含的其中兩個較有趣 (可能不常見) 的標準視覺效果。Waterfall and funnel charts are two of the more interesting (and perhaps uncommon) standard visualizations that are included in Power BI. 若要建立任一種類型的空白圖表,請從 [視覺效果] 窗格中選取其圖示。To create a blank chart of either type, select its icon from the Visualizations pane.

瀑布圖通常用來顯示某個值經過一段時間的變化。Waterfall charts are typically used to show changes in a particular value over time.

瀑布圖只有兩個值區選項︰[類別] 和 [Y 軸]。Waterfalls only have two bucket options: Category and Y Axis. 請將以時間為基礎的欄位 (例如 [年]) 拖曳到 [類別] 值區,並將您要追蹤的值拖曳到 [Y 軸] 值區。Drag a time-based field such as year to the Category bucket, and the value you want to track to the Y Axis bucket. 預設會以綠色顯示數值增加的時間週期,並以紅色顯示數值減少的時間週期。Time periods where there was an increase in value are displayed in green by default, while periods with a decrease in value are displayed in red.

漏斗圖通常用來顯示某個處理程序 (例如準銷售案源或網站保留工作) 的變化。Funnel charts are typically used to show changes over a particular process, such as a sales pipeline or website retention efforts.

瀑布圖漏斗圖都能加以分割並以視覺化方式進行自訂。Both Waterfall and Funnel charts can be sliced and visually customized.

量測計與單一數字卡片Gauges and single-number cards

一般來說,視覺效果是用來比較兩個以上不同的值。Generally, visualizations are used to compare two or more different values. 不過,有時在您建立報表時,可能只想追蹤一段時間的單一關鍵效能指標 (KPI) 或度量。However, sometimes when building reports you may want to track a just single Key Performance Indicator (KPI) or metric over time. 若要在 Power BI Desktop 中執行此作業,您可以使用量測計單一數字卡視覺效果。The way to do this in Power BI Desktop is with a Gauge or single number card visual. 若要建立任一種類型的空白圖表,請從 [視覺效果] 窗格中選取其圖示。To create a blank chart of either type, select its icon from the Visualizations pane.

若您是要建置儀表板並想顯示特定目標的進度,量測計就非常實用。Gauges are particularly useful when you are building dashboards and want to show progress towards a particular target. 若要建立量測計,請從 [視覺效果] 窗格中選取其圖示,然後將您想要追蹤的欄位拖曳至 [值] 的值區。To create a gauge, select its icon from the Visualizations pane, and drag the field you want to track into the Value bucket.

量測計預設會顯示為 50%,或 [值] 的雙倍,而您可使用兩種方式來調整此設定。Gauges appear by default at 50%, or double the Value, and there are two ways to adjust this setting. 若要以動態方式設定值,請將欄位拖曳至 [最小]、[最大] 和 [目標] 值區。To dynamically set the values, drag fields to the Minimum, Maximum, and Target Value buckets. 或者,使用視覺效果的格式化選項,以手動方式自訂您的量測計範圍。Alternatively, use the visual formatting options to manually customize the range of your gauge.

卡片視覺效果只會顯示欄位的數值表示法。Card visualizations simply show a numeric representation of a field. 預設卡片視覺效果會使用顯示單位以保持數字簡短;例如,顯示 "$5bn" 而不是 "$5,000,000,000"。By default card visuals use display units to keep the number short, for example displaying "$5bn" instead of "$5,000,000,000". 使用視覺效果格式化選項來變更所使用的單位,或完全停用。Use the visual formatting options to change the unit being used, or disable it completely.

您可以透過卡片來顯示已與文字串連的自訂量值,這是一種非常有趣的應用方式。One interesting application of cards is to have them display a custom measure that you've concatenated with text. 若要使用之前的範例,您可以搭配自訂量值讓卡片包括進階的 DAX 函數並顯示類似於 "Total revenue this year: $5bn" 或 "Progress on unit sales this year:" 的項目,然後加入代表進度的數字。To use the earlier example, with a custom measure your card could include advanced DAX functions and display something like, "Total revenue this year: $5bn" or "Progress on unit sales this year:" and then add the number that represents the progress.

修改圖表和視覺效果中的色彩Modify colors in charts and visuals

很多時候,您可能需要修改圖表或視覺效果中使用的色彩。There are many times when you might want to modify the colors used in charts or visuals. Power BI 可讓您充分掌控色彩的顯示方式。Power BI gives you lots of control over how colors are displayed. 若要開始使用,請選取 [視覺效果] 窗格中的某個視覺效果,然後按一下畫刷圖示。To get started, select a visual then in the Visualizations pane, click the paintbrush icon.

您可透過許多選項來變更視覺效果的色彩或格式。There are many options for changing the colors or formatting of the visual. 您可以選取 [預設色彩] 旁邊的色彩選擇器,然後選取所要的色彩,以變更視覺效果的所有橫條色彩。You can change the color of all bars of a visual by selecting the color picker beside Default color, then selecting your color of choice.

您也可以將 [全部顯示] 滑桿切換為開啟,藉此變更每個橫條 (或其他項目,視您選取的視覺效果類型而定) 的色彩。You can also change the color of each bar (or other element, depending on the type of visual you selected) by toggling the Show all slider to on. 當您這樣做時,每個項目都會顯示色彩選取器。When you do, a color selector appears for each element.

您也可以依據值或量值來變更色彩。You can also change the color based on a value, or measure. 若要這樣做,請將欄位拖曳到 [視覺效果] 窗格中的 [色彩飽和度] 值區 (請注意,此適用於欄位區區段而非畫刷區段)。To do so, drag a field into the Color saturation bucket in the Visualizations pane (note that this is available in the field well section, not the paintbrush section).

此外,您可以在填滿資料元素色彩時,變更所使用的色階和色彩。In addition, you can change the scale and the colors that are used when filling data element colors. 您也可以將 [發散] 滑桿切換為開啟,以選取發散色階,並設定三種色彩之間的色階。You can also select a diverging scale by toggling the Diverging slider to on, which lets the color scale between three colors. 您也可以設定在圖表上顯示的 [最小]、[置中] 和 [最大] 值。And you can also set Minimum, Center, and Maxumum values displayed on your chart.

您也可以使用這些值來建立規則,例如,將特定色彩設為高於零,而另一種色彩設為低於零。You can also use those values to create rules, for example, to set values above zero a certain color, and values below to another color.

另一個使用色彩的便利工具是設定「常數線」,有時也稱為「參考線」。Another handy tool for using colors is setting a constant line, also sometimes referred to as a reference line. 您可以設定常數線的值與其色彩,甚至可以在參考線中包含標籤。You can set the value of the constant line, set its color, and even have the reference line contain a label. 若要建立常數線 (及其他相關線條),請選取 [分析] 窗格 (類似放大鏡),然後展開 [參考線] 區段。To create a constant line (and other interesting lines), select the Analytics pane (looks like a magnifying glass) then expand the Reference Line section.

您可以為視覺效果建立的許多其他線條 (也位於 [分析] 窗格中),例如線下限、線上限、平均線、中線和百分位數線。There are many other lines you can create for a visual, also found in the Analytics pane, such as Min, Max, Average, Median, and Percentile lines.

最後,您可以建立個別視覺效果的框線;如同其他控制項,您也可以指定該框線的色彩。Lastly, you can create a border around an individual visualization, and like other controls, you can specify the color of that border as well.

圖案、文字方塊和影像Shapes, text boxes, and images

除了資料繫結視覺效果之外,您也可以加入靜態項目 (例如文字方塊、影像和圖案) 來改善報表的視覺化設計。Along with data-bound visuals, you can also add static elements such as text boxes, images, and shapes to improve the visual design of your reports. 若要加入視覺項目,請從 [常用] 索引標籤選取 [文字方塊]、[影像] 或 [圖案]。To add a visual element, select Text Box, Image, or Shapes from the Home tab.

文字方塊是顯示視覺效果的大型標題、說明文字或一段簡短資訊的理想方式。Text boxes are an ideal way to display large titles, captions, or short paragraphs of information along with your visualizations. 文字方塊可以透過撰寫的 URL,或藉由醒目提示錨點片語並選取文字方塊選項列上的連結符號,來包含連結。Text boxes can include links, either through a written URL or by highlighting an anchor phrase and selecting the link symbol on the text box options bar. 您可以在文字方塊中包含 URL,Power BI 會自動偵測並啟用該連結。You can include URLs in text boxes, and Power BI automatically detects the link, and makes it live.

選取 [影像] 會開啟檔案瀏覽器,您可以在此選取您電腦或其他網路來源中的影像。Selecting Image will open a file browser where you can select the image from your computer or other networked source. 根據預設,調整報表中影像的大小會維持其外觀比例,但您可以透過視覺格式設定選項來停用此設定。By default, resizing an image in your report will maintain its aspect ratio, but this can be disabled in the visual formatting options.

圖案有五個不同的格式選項,包括矩形和箭頭。Shapes have five different options for form, including rectangles and arrows. 圖案可以是不透明,或透明但具有彩色框線Shapes can be opaque, or transparent with a colored border. (後者適用於在多組視覺效果周圍建立框線)。(The latter is useful for creating borders around groups of visualizations.)

頁面配置和格式化Page layout and formatting

Power BI Desktop 可讓您控制報表頁面的配置和格式,例如大小和方向。Power BI Desktop gives you the ability to control the layout and formatting of your report pages, such as size and orientation.

您可以使用 [常用] 索引標籤中的 [頁面檢視] 功能表,來變更報表頁面的縮放方式。Use the Page View menu from the Home tab to change the way your report pages scale. 可用的選項包括 [調整成一頁] (預設)、[符合寬度] 和 [實際大小]。The available options include Fit To Page (default), Fit To Width, and Actual Size.

您也可以變更頁面大小本身。You can also change the pages size itself. 報表頁面預設為 16:9。By default, report pages are 16:9. 若要變更頁面大小,請確定未選取任何視覺效果,然後在 [視覺效果] 窗格中選取畫刷圖示,再選取 [頁面大小] 展開該區段。To change the page size, make sure no visuals are selected, then select the paintbrush icon in the Visualizations pane, then select Page Size to expand that section.

頁面大小的選項包括 4x3 (外觀比例較接近正方形) 和 [動態] (頁面會延伸填滿可用空間)。Options for page size include 4x3 (more square aspect ratio), and Dynamic (the page will stretch to fill the available space). 此外,也提供報表的標準 Letter 大小。There's a standard letter size for reports as well. 請記住,變更頁面大小之後,您可能需要調整視覺效果的大小,以確保視覺效果完全在畫布上。Keep in mind that you may need to resize your visuals after changing the page size to ensure that they're completely on the canvas.

您也可以指定自訂頁面大小、依英吋或像素設定大小,以及變更整份報表的背景色彩。You can also specify a custom page size, setting the size by inches or pixels, and change the background color of the entire report.

另一個選項是選取 Cortana,這會調整報表大小,使其可作為使用 Cortana 搜尋的結果。Another option is to select Cortana, which sizes the report so that it can be used as a result for searches using Cortana.

將視覺效果之間的互動分組Group interactions among visualizations

當您在相同的報表頁面上有多個視覺效果時,按一下或使用交叉分析篩選器來選取特定區段會影響該頁面上的所有視覺效果。When you have multiple visualizations on the same report page, selecting a particular segment by clicking or using a slicer will affect all the visuals on that page. 不過在某些情況下,您可能只想分割特定視覺效果。In some cases, though, you may want to slice only specific visuals. 特別是使用散佈圖等項目時,若將資料限制在特定區段,便會移除重要的意義。This is particularly true when using elements such as scatter plots, where limiting the data to a specific segment will remove crucial meaning. 所幸 Power BI Desktop 可讓您控制視覺效果之間的互動方式。Fortunately, Power BI Desktop lets you control how interactions flow between visuals.

若要變更視覺效果之間的互動方式,請從 [常用] 功能區的 [視覺效果] 區段,選取 [編輯] 以開啟 [編輯模式]。To change the interaction between your visualizations, select Edit from the Visuals section of the Home ribbon to toggle Edit Mode on.

注意

自這段影片錄製以來,Power BI Desktop 中的編輯互動圖示已變更。The Edit Interactions icon in Power BI Desktop has changed since the video was recorded.

現在當您選取報表畫布上的視覺效果時,您會在它將影響的所有其他視覺效果右上角,看到一個不透明的 篩選 小圖示。Now when you select a visual on your report canvas, you'll see a small opaque filter icon in the top right-hand corner of every other visual it will affect. 若要將某個視覺效果從互動中排除,請按一下右上角 篩選 圖示附近的 符號。To exclude a visual from the interaction, click the None symbol in the upper right corner, near the filter icon.

在某些情況下,您可以調整視覺效果之間所發生的篩選互動類型。In some instances you can adjust the type of filter interaction that happens between visuals. 開啟 [編輯模式] 時,選取您要用來篩選的視覺效果。With Edit Mode toggled on, select the visual you use to filter. 如果您可以變更另一個視覺效果的互動類型,右上角的篩選圖示旁邊會出現 圓形圖 圖示。If you can change the type of interaction on another visual, a pie chart icon will appear next to the filter icon in the top right-hand corner.

按一下 圓形圖 圖示即可醒目提示分割的資料。Click the pie chart icon to highlight the segmented data. 否則會篩選資料。Otherwise, the data will be filtered. 如前所述,您可以按一下 圖示來移除所有互動。As before, you can click the None icon to remove all interaction.

一個實用的設計秘訣是在彼此互動的視覺效果周圍繪製一個透明圖案,讓使用者清楚了解這兩者具有互動關係。A useful design tip is to draw a transparent shape around visuals that interact with each other, so it's clear to the user that they have an interactive relationship.

複製報表頁面Duplicate a report page

報表的個別頁面可能包含以特定方式互動並具有精確格式的多個視覺效果,因此相當複雜。Individual pages of a report can be quite complex, with multiple visualizations that interact in specific ways and have precise formatting. 當您建立報表時,您有時可能想要針對兩個不同的頁面主題,使用相同的視覺效果和配置。Occasionally when building a report, you may want to use the same visuals and layouts for two different page topics. 例如,如果您剛匯集了有關總收益的報表頁面,您可能想要針對淨收益使用幾乎完全相同的頁面。For example, if you've just put together a report page on gross revenue, you may want an almost identical page on net revenue.

重新建立所有工作會很困難,但透過 Power BI Desktop,您可以直接複製報表頁面。Recreating all of your work would be difficult, but with Power BI Desktop you can just duplicate a report page.

以滑鼠右鍵按一下您要複製的索引標籤,然後選取 [複製頁面]。Right-click on the tab you want to copy, and select Duplicate Page.

您可以接著適當地重新命名新的頁面索引標籤、更新文字標題 (如果有),然後以您要追蹤的新欄位更新視覺效果。You can then rename the new page tab as appropriate, update the text title if you have one, and then update your visuals with the new field you want to track.

顯示沒有資料的類別Show categories with no data

根據預設,資料行標題只有包含資料時,才會在報表中顯示。By default, column headings are only displayed in your reports if they contain data. 例如,如果您依國家/地區顯示收益,但沒有挪威的銷售額,則挪威不會出現在視覺效果的任何地方。For example, if you were displaying revenue by country and had no sales in Norway, then Norway would not appear anywhere in your visualization.

若要顯示空白類別,請在 [視覺效果] 窗格中,按一下您要變更之欄位中的向下箭號,然後選取 [顯示沒有資料的項目]。To display empty categories, click on the down-arrow in the field you want to change in the Visualizations pane, and select Show items with no data.

任何空白資料行現在會出現在視覺效果中,但值為空白。Any empty columns now appear in your visual with blank values.

一旦您在 [視覺效果] 窗格中,針對任何欄位選取 [顯示沒有資料的項目],就會套用至 [視覺效果] 窗格中顯示的所有欄位。Once you select Show items with no data for any field in the Visualizations pane, it applies to all fields displayed in the Visualizations pane. 因此,如果您新增另一個欄位,也會顯示沒有資料的任何項目,而不必重新瀏覽下拉式功能表。So if you add another field, any items that have no data will also be shown, without having to revisit the drop-down menu.

摘要和類別選項Summarization and category options

Power BI 提供可指派給模型欄位的屬性,這些屬性可協助以更清楚的方式來報告、視覺化及呈現資料。Power BI has properties that you can assign for fields in your model, which can help report and visualize and present data in ways that provide more clarity. 例如,您有時想要取得一份數字清單的平均值,但 Power BI 卻自動加總該清單。For example, sometimes you want to average a list of numbers, but Power BI automatically sums the list. 使用 Power BI,您可以調整這些數字清單的摘要方式。With Power BI, you can adjust how those lists of numbers are summarized.

透過摘要控制數值Numeric control over summarization

讓我們舉例說明,並示範如何控制 Power BI 摘要數值資料欄位的方式。Let's take an example, and demonstrate how to control the way Power BI summarizes numeric data fields.

在您的報表畫布上,選取一個視覺效果,然後在 [欄位] 窗格中,選取一個欄位。Select a visual on your report canvas, and then select a field in the Fields pane. [模型] 索引標籤隨即出現在功能區中,並顯示格式化資料的選項及資料屬性。The Modeling tab appears in the ribbon and displays options for formatting data, and data properties.

您可以選取貨幣符號下拉式清單,來選取所使用的貨幣符號類型,如下圖所示。You can select the type of currency symbol used, by selecting the currency symbol drop down, which is shown in the following image.

格式化欄位有許多不同的選項。There are many different options for formatting fields. 例如,您可以將貨幣格式變更為百分比格式。For example, you can change the format from currency to percentage.

您也可以變更 Powwer BI 摘要資料的方式。You can change how Powwer BI summarizes the data, too. 選取預設摘要圖示可變更欄位的摘要方式,包括顯示總和、計數或平均值。Select the Default Summarization icon to change how a field is summarized, including displaying a sum, a count, or an average.

管理並釐清您的位置資料Manage and clarify your location data

在地圖上繪製位置時,可進行類似的變更。You can make similar changes when plotting locations on a map. 選取您的地圖,然後在 [欄位] 窗格中,選取您要用於 [位置] 值的欄位。Select your map, and then select the field in the Fields pane that you use for the Location value. 在 [模型] 索引標籤上,選取 [資料類別],然後從下拉式功能表選擇代表您位置資料的類別。On the Modeling tab, select Data Category and then choose the category that represents your location data from the drop-down menu. 例如,選取省、縣市或鄉/鎮/市/區。For example, select state, county, or city.

圖層順序Z-order

當您在報表上有許多項目時,Power BI 可讓您管理這些項目相互重疊的方式。When you have lots of elements on a report, Power BI lets you manage how they overlap with each other. 項目的分層方式或相互重疊的排列方式通常稱為圖層順序。How items are layered, or arranged on top of one another, is often referred to as the z-order.

若要管理報表中項目的圖層順序,請選取一個項目,然後使用功能區之 [常用] 索引標籤上的 [排列] 按鈕,來變更其圖層順序。To manage the z-order of elements in a report, select an element, and use the Arrange button on the Home tab of the ribbon to change its z-order.

藉由使用 [排列] 按鈕功能表中的選項,就能依照您想要的方式來排序報表的項目。By using the options in the Arrange button menu, you can get the ordering of elements on you report just the way you want it. 您可以將視覺效果上移一層或下移一層,或者傳送到整個順序的最前方或最後方。You can move a visual one layer forward or backward, or send it all the way to the front of the back of the order.

當您使用圖案作為裝飾背景或框線,或想要醒目提示個別圖表或圖形的特定區段時,使用 [排列] 按鈕會特別有用。Using the Arrange button is particularly useful when using shapes as decorative backgrounds or borders, or to highlight particular sections of an individual chart or graph. 您也可以用來建立背景,例如以下用於報表標題背景的淺藍色矩形。You can also use them to create a background, such as the following light-blue rectangle being used for a report title background.

視覺效果階層和向下鑽研Visual hierarchies and drill-down

當您將 [日期] 欄位加入視覺效果的 [軸] 欄位值區時,Power BI 會自動加入包含「年」、「季」、「月」和「日」的時間階層。When you add a date field to a visual in the Axis field bucket, Power BI automatically adds a time hierarchy that includes Year, Quarter, Month and Day. 如此一來,Power BI 就能讓您的視覺效果提供以時間為基礎的互動給檢視報表的使用者,讓使用者向下鑽研這些不同的時間層級。By doing this, Power BI allows your visuals to have time-based interaction with those viewing your reports, by letting users drill-down through those different time levels.

有了此階層,您就可以開始向下鑽研時間階層。With a hierarchy in place, you can begin drilling down through the time hierarchy. 例如,按一下圖表中的某年即可向下鑽研到此階層的下一個層級 (在本例中為「季」),並接著在視覺效果中顯示該層級。For example, clicking a year in the chart drills down to the next level in the hierarchy, in this case Quarters, which are then displayed in the visual.

在此自動建立的階層中,您也可以管理允許其他人鑽研的共用報表層級。In that automatically created hierarchy, you can also manage to which level your shared report allows people to drill. 若要這樣做,只要在 [視覺效果] 窗格中,按一下您要移除之階層旁邊的 X 即可。To do this, in the Visualizations pane, simply click the X beside the hierarchy that you want to remove. 已刪除的層級會從報表中移除,鑽研時不會再顯示該層級。The deleted level is removed from the report, and drilling no longer displays that level.

如果您需要取回該階層層級,只要移除 [日期] 欄位,然後從 [欄位] 窗格再次加入即可,系統會再次自動為您建立此階層。If you need to get that level of the hierarchy back, just remove the date field, and then add it again from the Fields pane, and the hierarchy is once again created for you automatically.

您有時可能不想要某個視覺效果使用此階層。There may be times when you don't want the hierarchy to be used for a visual. 若要控制此設定,您可以在將 [日期] 欄位加入視覺效果之後,選取欄位旁邊的向下箭號按鈕,然後選取 [日期] 而不是 [日期階層]。You can control that by selecting the down-arrow button beside the Date field (once you've added it to a visual), and select Date rather than Date Hierarchy. 系統會提示 Power BI 在視覺效果中顯示原始日期值。That prompts Power BI to show the raw date values in the visual.

您也可以同時展開目前可見的所有資料項目,而不是選取某一季或某一年。You can also expand all data elements currently visible at once, rather than selecting a single quarter, or a single year. 若要這樣做,請選取視覺效果左上方的 全部鑽研 圖示,也就是向下雙箭號圖示。To do that, select the Drill all icon in the top left of the visual, which is a double-down arrow icon.

Power BI Desktop 中的 R 整合R integration in Power BI Desktop

在 Power BI Desktop 中,您可以藉由與 R 整合,來執行分析和統計分析,並建立吸引人的視覺效果。您可以在 Power BI Desktop 報表中包含這些 R 視覺效果。With Power BI Desktop, you can perform analytical and statistical analysis and create compelling visuals by integrating with R. You can host those R visualizations within the Power BI Desktop report.

當您從 [視覺效果] 窗格選取 R 視覺效果圖示時,Power BI 會在畫布上建立一個預留位置來包含 R 視覺效果,然後提供 R 指令碼編輯器以供您直接在畫布上使用。When you select the R visual icon from the Visualizations pane, Power BI creates a placeholder on the canvas to host your R visual, and then presents an R script editor for you to use right on the canvas. 您可以將欄位加入 R 視覺效果,Power BI Desktop 會將其加入 R 指令碼編輯器窗格。As you add fields to the R visual, Power BI Desktop adds them to the R script editor pane.

以下是 Power BI 在 R 指令碼編輯器中所產生的內容,您可以開始建立自己的 R 指令碼,以產生視覺效果。Below what Power BI generates in the R script editor, you can begin creating your R script to generate the visual. 指令碼完成之後,選取 [執行],下列情況會隨即發生︰Once your script is complete, select Run and the following occurs:

  1. 加入視覺效果的資料 (透過 [欄位] 窗格) 會從 Power BI Desktop 傳送到 R 的本機安裝The data added to the visual (from the Fields pane) is sent from Power BI Desktop to the local installation of R
  2. 在 Power BI Desktop R 指令碼編輯器中建立的指令碼會在 R 的本機安裝中執行The script created in the Power BI Desktop R script editor is run on that local installation of R
  3. 然後 Power BI Desktop 會從 R 安裝取回視覺效果並在畫布上顯示Then Power BI Desktop gets a visual back from the R installation, and displays it on the canvas

所有作業都會相當快速地進行,並在畫布上的 R 視覺效果中顯示結果。It all happens quite quickly, and the result appears in the R visual visualization on the canvas.

您可以變更 R 視覺效果,方法是調整 R 指令碼,然後選取 [執行]。You can change the R visual by adjusting the R script, and then selecting Run again. 在下圖中,我們將視覺效果變更為顯示圓形,而不是正方形。In the following image, we changed the visual to display circles instead of squares.

由於 R 視覺效果就像是 Power BI Desktop 中的任何其他視覺效果,因此您也可以與之互動並建立與畫布上其他視覺效果的連接。And since the R visual is just like any other visual in Power BI Desktop, you can interact with it and make connections with other visuals on the canvas as well. 當您透過篩選或醒目提示與畫布上其他視覺效果互動時,R 視覺效果會像是任何其他 Power BI 視覺效果一樣自動回應,而不需要調整 R 指令碼。When you interact with other visuals on the canvas, through filtering or highlighting, the R visual automatically reacts just like any other Power BI visual, without needing to adjust the R script.

這是直接在 Power BI Desktop 中使用 R 功能的絕佳方式。It's a great way to use the power of R, right in Power BI Desktop.

後續步驟Next steps

恭喜您!Congratulations! 您已完成 Power BI 引導式學習課程的<視覺效果>一節。You've completed this Visualizations section of the Guided Learning course for Power BI. 您已精通 Power BI 所提供的許多視覺效果,並已了解如何使用、修改及自訂這些視覺效果。You can consider yourself well-versed in the many visualizations offered in Power BI, and also knowledgeable about how to use, modify, and customize them. 還有一個好消息︰Power BI Desktop 和 Power BI 服務的視覺效果基本上相同,因此您學習到的內容適用於兩項產品。And good news: visualizations are essentially the same in Power BI Desktop and the Power BI service, so what you learned applies to both.

您現在準備好前往雲端並投入 Power BI 服務,您可以在此探索資料You're now ready to head to the cloud and get immersed in the Power BI service, where you can Explore Data. 如您所知,此工作流程類似如下︰As you know, the flow of work looks something like the following:

  • 將資料帶入 Power BI Desktop 並建立報表。Bring data into Power BI Desktop, and create a report.
  • 發行至 Power BI 服務,在此建立新的視覺效果及建立儀表板Publish to the Power BI service, where you create new visualizations and build dashboards
  • 與其他人共用儀表板,尤其是行動工作者。Share your dashboards with others, especially people who are on the go
  • 使用 Power BI Mobile 應用程式來檢視共用的儀表板和報表,並與之互動。View and interact with shared dashboards and reports in Power BI Mobile apps

不論您是建立報表,或只是檢視報表並與之互動,您現在都知道如何建立所有酷炫的視覺效果,以及這些視覺效果如何連接到資料。Whether you create reports or just view and interact with them, you now know how all those cool visuals are created, and how they connected to the data. 接下來,我們將探討這些視覺效果和報表的操作方式。Next we get to see those visuals and reports in action.

下一節見!See you in the next section!

恭喜!

做得很好。Nice work. 您已完成引導式學習視覺效果一節,請準備好進行下一個教學課程 - 探索資料You've completed the Visualizations section of Guided Learning, and you're ready for the next tutorial - Exploring data.

您已學到如何...

下一個教學課程

探索資料Exploring data

參與者

  • Davidiseminger
  • olprod
  • Alisha-Acharya