報表 [篩選] 窗格概觀Take a tour of the report Filters pane

這篇文章深入探討報表 [篩選] 窗格。This article takes a deep look at the report Filters pane. 您會在 Power BI 服務的 [編輯檢視] 和 [正在讀取檢視],以及 Power BI Desktop 的 [報表檢視] 中看見此窗格。You'll see the pane in Power BI service Editing View and Reading View and in Power BI Desktop Report view.

有許多不同的方式可在 Power BI 中篩選資料,建議您先閱讀關於篩選和反白顯示There are many different ways to filter data in Power BI and we recommend first reading About filters and highlighting.

使用報表篩選窗格Working with the report Filters pane

在 Power BI Desktop 中,您可以在報表檢視中開啟報表。In Power BI Desktop, reports are opened in Report view. 在 Power BI 服務中,您可以在編輯檢視或閱讀檢視中開啟報表。In Power BI service, reports can be opened in Editing view or Reading view. 在 [編輯檢視] 和 Desktop 的 [報表檢視] 中,報表擁有者可以將篩選新增至報表,而這些篩選會與報表一起儲存。In Editing view, and in Desktop Report view, report owners can add filters to a report and those filters are saved with the report. 在 [閱讀檢視] 中檢視報表的人員可以與篩選互動及儲存變更,但無法在報表新增篩選。People viewing the report in Reading view can interact with the filters and save their changes, but cannot add new filters to the report.

在 Power BI 服務中,報表會保留您在 [篩選] 窗格中所做的任何變更,而這些變更會傳送至行動版的報表。In Power BI service, reports retain any changes you make in the Filters pane, and those changes are carried through to the mobile version of the report. 若要將 [篩選] 窗格重設為建立者預設值,請從頂端功能表列選取 [重設為預設值]。To reset the Filter pane to the creator defaults, select Reset to default from the top menubar.

開啟 [篩選] 窗格Open the Filters pane

開啟報表時,[篩選] 窗格會顯示於報表畫布右方。When a report is open, the Filters pane displays along the right side of the report canvas. 若未看見窗格,請選取右上角的箭號展開窗格。If you don't see the pane, select the arrow in the top-right corner to expand it. 如果您在 Power BI 服務的 [閱讀檢視] 中,右邊唯一可用的窗格是 [篩選] 窗格。If you are in Power BI service Reading view, the only pane available on the right side is the Filters pane.

在此範例中,我們已選取具有 6 個篩選的視覺效果。In this example, we've selected a visual that has 6 filters. 報表頁面也有篩選,列在 [頁面層級篩選] 標題下。The report page also has filters, listed under the Page level filters heading. 有一個鑽研篩選,整份報表也有一個篩選︰FiscalYear 是 2013 或 2014。There is one Drillthrough filter, and the entire report has a filter too: FiscalYear is 2013 or 2014.

有些篩選旁邊有 All 字組,這表示所有值作為一個篩選。Some of the filters have the word All next to them and this means that all values are being included in the filter. 例如,下方螢幕擷取畫面中的 [Chain(All)] 表示此報表頁面包含所有連鎖店的相關資料。For example, Chain(All) in the screenshot below tells us that this report page includes data about all the store chains. 相反地,[FiscalYear is 2013 or 2014] 的報表層級篩選表示報表只包含會計年度 2013 年及 2014 年的資料。On the other hand, the report level filter of FiscalYear is 2013 or 2014 tells us that the report only includes data for the fiscal years of 2013 and 2014.

檢視此報表的任何人都可以使用這些篩選器互動。Anyone viewing this report can interact with these filters.

  • 暫留然後選取篩選旁邊的箭號,即可檢視篩選的詳細資料。View the details of the filter by hovering and selecting the arrow next to the filter.

  • 變更篩選,例如將 [Lindseys] 變更為 [Fashions Direct]。Change the filter, for example, change Lindseys to Fashions Direct.

  • 從頂端功能表列選取 [重設為預設值],將篩選重設為其原始狀態。Reset the filters to their original state by selecting Reset to default from the top menubar.

  • 選取篩選名稱旁邊的 x 即可刪除篩選。Delete the filter by selecting the x next to the filter name.

    刪除篩選會將其從清單移除,但不會從報表刪除資料。Deleting a filter removes it from the list but does not delete the data from the report. 例如,如果您刪除 [FiscalYear is 2013 or 2014] 篩選,會計年度資料仍會留在報表中,但不會再篩選為僅顯示 2013 年及 2014 年;將顯示資料包含的所有會計年度。For example, if you delete the FiscalYear is 2013 or 2014 filter, fiscal year data will still remain in the report but it will no longer be filtered to show only 2013 and 2014; it will show all fiscal years the data contains. 不過,刪除篩選後即無法再加以修改,因為其已從清單移除。However, once you delete the filter, you won't be able to modify it again since it is removed from the list. 清除篩選是較佳的選擇,方法是選取橡皮擦圖示 A better option is to clear the filter by selecting the eraser icon .

[編輯檢視] 中的篩選Filters in Editing View

在 Desktop 或 Power BI 服務的 [編輯檢視] 中開啟報表時,[篩選] 窗格會顯示於 [視覺效果] 窗格底部的報表畫布右方。When a report is open in Desktop or in Power BI service Editing view, the Filters pane displays along the right side of the report canvas in the bottom half of the Visualization pane. 若未看見窗格,請選取右上角的箭號展開窗格。If you don't see the pane, select the arrow in the top-right corner to expand it.

..

如果在畫布上不選取任何視覺效果,則 [篩選] 窗格只會顯示套用至整份報表分頁和整個報表的篩選,以及任何鑽研篩選 (如有設定)。If no visual is selected in the canvas, then the Filters pane displays just the filters that apply to the entire report page or entire report, and any drillthrough filters (if any have been set). 在下列範例中,未選取任何視覺效果,也沒有頁面層級或鑽研篩選,但是有報表層級篩選。In the example below, no visual is selected and there are no page level or drillthrough filters but there is a report level filter.

如果在畫布上選取視覺效果,您也會看到只套用到該視覺效果的篩選:If a visual is selected in the canvas, you will also see the filters that apply to just that visual:

若要顯示特定篩選的選項,選取篩選名稱旁邊的向下箭號。To display options for a particular filter, select the down arrow next to the filter name. 在下列範例中,報表層級篩選設為 2013 年和 2014 年。In the example below, the report level filter is set to 2013 and 2014. 而且這是基本篩選範例。And this is an example of basic filtering. 若要顯示進階選項,請選取 [進階篩選]。To display the advanced options, select Advanced Filtering.

清除篩選Clear a filter

在進階或基本篩選模式中,選取橡皮擦圖示 清除篩選。In either advanced or basic filtering mode, select the eraser icon to clear the filter.

新增篩選Add a filter

  • 在 Desktop 和 Power BI 服務的 [編輯檢視] 中,藉由從 [欄位] 窗格選取欄位,並將它拖曳到適當的篩選 (您會看到 [將欄位拖曳到這裡] 文字),以將篩選新增至視覺效果、分頁、鑽研或報表。In Desktop and in Power BI service Editing view, add a filter to a visual, page, drillthrough, or report by selecting a field from the Fields pane and dragging it into the appropriate filter well, where you see the words Drag fields here. 將欄位作為篩選新增時加以微調,方法是使用 [基本篩選] 及 [進階篩選] 控制項 (如下所述)。Once a field has been added as a filter, fine-tune it using the Basic filtering and Advanced filtering controls (described below).

  • 將新的欄位拖曳至視覺效果層級篩選區域不會將該欄位新增至視覺效果,但能讓您使用此新欄位篩選該視覺效果。Dragging a new field into the Visual level filter area does not add that field to the visual, but it does allow you to filter the visual with this new field. 在下方範例中,[Chain] 作為新篩選新增至視覺效果。In the example below, Chain is added as a new filter to the visual. 請注意,僅將 [Chain] 作為篩選新增並不會更改視覺效果,除非您使用 [基本篩選] 或 [進階篩選] 控制項。Notice that simply adding Chain as a filter does not alter the visual until you use the Basic or Advanced filtering controls.

  • 用來建立視覺效果的所有欄位也可以作為篩選。All the fields that are used to create a visualization are also available as filters. 首先,選取要啟用的視覺效果。First, select a visual to make it active. 視覺效果正使用的欄位列於 [視覺效果] 窗格中,以及 [視覺效果層級篩選] 標題下的 [欄位] 窗格中。The fields that are being used in the visual are listed in the Visualizations pane and in the Filters pane under the Visual level filters heading.

    微調這些欄位中的任何項目,方法是使用 [基本篩選] 及 [進階篩選] 控制項 (如下所述)。Fine-tune any of these fields using the Basic filtering and Advanced filtering controls (described below).

篩選類型:文字欄位篩選Types of filters: text field filters

清單模式List mode

勾選核取方塊可以選取或取消選取值。Ticking a checkbox either selects or deselects the value. [所有] 核取方塊可以用來開啟或關閉所有核取方塊的切換狀態。The All checkbox can be used to toggle the state of all checkboxes on or off. 核取方塊代表該欄位所有可用的值。The checkboxes represent all the available values for that field. 當您調整篩選之後,會更新重新計算陳述式以反映您的選擇。As you adjust the filter, the restatement updates to reflect your choices.

請注意現在的重新計算陳述式寫著 "is Amarilla or Carretera"Note how the restatement now says "is Amarilla or Carretera"

進階模式Advanced mode

選取 [進階篩選] 以切換到進階模式。Select Advanced Filtering to switch to advanced mode. 使用下拉式清單控制項和文字方塊,來識別要包含哪些欄位。Use the dropdown controls and text boxes to identify which fields to include. 您可以選擇 [And] 和 [Or],建立複雜的篩選運算式。By choosing between And and Or, you can build complex filter expressions. 當您已設定想要的值之後,請選取 [套用篩選] 按鈕。Select the Apply Filter button when you've set the values you want.

篩選類型:數值欄位篩選Types of filters: numeric field filters

清單模式List mode

如果這些值為有限時,選取欄位名稱之後就會顯示清單。If the values are finite, selecting the field name displays a list. 如需使用核取方塊的說明,請參閱上述 [文字欄位篩選] > [清單模式]。See Text field filters > List mode above for help using checkboxes.

進階模式Advanced mode

如果值為無限或代表某種範圍,則選取欄位名稱之後會開啟進階篩選模式。If the values are infinite or represent a range, selecting the field name opens the advanced filter mode. 使用下拉式清單和文字方塊來指定您想要查看值的範圍。Use the dropdown and text boxes to specify a range of values that you want to see.

您可以選擇 [And] 和 [Or],建立複雜的篩選運算式。By choosing between And and Or, you can build complex filter expressions. 當您已設定想要的值之後,請選取 [套用篩選] 按鈕。Select the Apply Filter button when you've set the values you want.

篩選類型:日期和時間Types of filters: date and time

清單模式List mode

如果這些值為有限時,選取欄位名稱之後就會顯示清單。If the values are finite, selecting the field name displays a list. 如需使用核取方塊的說明,請參閱上述 [文字欄位篩選] > [清單模式]。See Text field filters > List mode above for help using checkboxes.

進階模式Advanced mode

如果欄位值代表日期或時間,則可以在使用日期/時間篩選時指定開始/結束時間。If the field values represent date or time, you can specify a start/end time when using Date/Time filters.

後續步驟Next steps

報表的篩選和醒目提示Filters and highlighting in reports
在 [閱讀檢視] 中與篩選條件及醒目提示互動Interact with filters and highlighting in report Reading View
在報表的編輯檢視中建立篩選條件Create filters in report Editing View
變更報表視覺效果相互交叉篩選及交叉醒目提示的方式Change how report visuals cross-filter and cross-highlight each other

深入了解 Power BI 中的報表Read more about reports in Power BI
Power BI - 基本概念Power BI - Basic Concepts

有其他問題嗎?More questions? 試試 Power BI 社群Try the Power BI Community