关于 Power BI 报表中的筛选器和突出显示About filters and highlighting in Power BI reports

筛选器可保留你最关切的数据,而将其他所有数据删除。Filters remove all but the data you want to focus on. 突出显示与筛选不同,因为它不会删除数据,而会将一部分可见数据突出显示;未突出显示的数据会保持可见但变暗。Highlighting is not filtering since it does not remove data but instead highlights a subset of the visible data; the unhighlighted data remains visible but dimmed.

有多种不同的方法可对 Power BI 中的报表进行筛选并对其突出显示。There are a lot of different ways you can filter and highlight reports in Power BI. 将所有这些信息放入到一篇文章中会令人困惑,因此我们将其划分如下:Putting all of that information in one article would get confusing, so we've broken it down like this:

提示

Power BI 如何知道数据的关联方式?How does Power BI knows how data is related? 它利用基础 数据模型 中不同表和字段之间的关系,使报表页面上的项目相互交互。It uses the relationships between the different tables and fields in the underlying data model to make items on a report page interact with each other.

使用“筛选器”窗格的报表中的筛选器和突出显示的介绍Introduction to filters and highlighting in reports using the Filters pane

可通过使用“筛选器”窗格或直接在报表本身上进行选择(即席,参见页面底部)以应用筛选器和突出显示。Filters and highlighting can be applied using the Filters pane or by making selections directly on the report itself (ad-hoc, see bottom of page). “筛选器”窗格显示报表中使用的表和字段,以及已应用的任何筛选器。The Filters pane shows the tables and fields used in the report and the filters that have been applied, if any. 筛选器划分为“页面级别筛选器”、“报表级别筛选器”和“视觉对象级别筛选器”。The filters are divided up into Page level filters, Report level filters, and Visual level filters. 如果在报表画布上选择了可视化效果,则仅能看到视觉对象级别筛选器。You'll only see visual level filters if you've selected a visualization on the report canvas.

提示

如果筛选器的旁边有“所有”字样,这意味着整个字段包括为一个筛选器。If the filter has the word All next to it, that means that entire field is being included as a 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 为 2013 或 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.

“阅读视图”和“编辑视图”中的筛选器Filters in Reading View versus Editing View

有两种模式可与报表交互:阅读视图和编辑视图There are two modes for interacting with reports: Reading view and Editing view. 而筛选功能会根据你所用的模式来提供。And the filtering capabilities available to you depend on which mode you're in.

  • 在“编辑视图”中,可以添加报表、页面和视觉对象筛选器。In Editing View, you can add report, page, and visual filters. 保存报表时,筛选器将随之一起保存。When you save the report, the filters are saved with it. 而在“阅读视图”中查看报表的人可以与你添加的筛选器交互,但不能保存他们所做的更改。People looking at the report in Reading View can interact with the filters you added, but not save their changes.
  • 在“阅读视图”中,可以与报表中已存在的任何页面和视觉对象筛选器进行交互,但不能保存筛选器所做的更改。In Reading View, you can interact with any page and visual filters that already exist in the report, but you won't be able to save your filter changes.

“阅读视图”中的“筛选器”窗格The Filters pane in Reading View

如果你只有“阅读视图”中报表的访问权限,则“筛选器”窗格如下所示:If you only have access to a report in Reading View, the Filters pane looks similar to this:

因此该报表页有 6 个页面级别筛选器和 1 个报表级别筛选器。So this page of the report has 6 page level filters and 1 report level filter.

若要查看是否存在视觉对象级别筛选器,请选择一个视觉对象。To see if any visual level filters exist, select a visual. 在下图中,气泡图具有 6 个应用的筛选器。In the image below, the bubble chart has 6 filters applied.

在“阅读视图”中,通过修改现有筛选器来浏览数据。In Reading View, explore the data by modifying the existing filters. 与阅读视图中的筛选器进行交互 一文中了解如何操作Learn how in the article Interact with filters in Reading view

“编辑视图”中的“筛选器”窗格The Filters pane in Editing View

当你具有某个报表的所有者权限并将其在“编辑视图”中打开时,会看到“筛选器”只是几个可用的编辑窗格之一。When you have owner permissions for a report and open it in Editing View, you see that Filters is just one of several editing panes available.

因为在“阅读视图”(上述)中,我们看到该报表页有 6 个页面级别筛选器和 1 个报表级别筛选器。As in Reading View (above) we see that this page of the report has 6 page level filters and 1 report level filter. 通过选择气泡图,我们看到它具有 6 个应用的视觉对象级别筛选器。And by selecting the bubble chart, we'd see it has 6 visual level filters applied.

但在“编辑视图”中,我们对筛选器和突出显示还可以进行更多的操作。But in Editing View, there is so much more that we can do with filters and highlighting. 主要区别是,我们可以添加新的筛选器。The main difference being that we can add new filters. 向报表添加筛选器 一文中了解如何操作以及更多信息Learn how to do this and so much more in the article Add a filter to a report

即席筛选和突出显示Ad-hoc filterting and highlighting

在报表画布上选择字段以进行筛选并突出显示剩余页。Select a field on the report canvas to filter and highlight the rest of the page. 在同一视觉对象中选择任何空格以将其删除。Select any empty space in the same visual to remove it. 该筛选和突出显示类型未通过报表保存,但却是快速浏览数据影响的有趣的方法。This type of filtering and highlighting is not saved with the report but is fun way to quickly explore data impacts. 若要对此类交叉筛选和交叉突出显示的工作方式进行微调,请参阅 视觉对象交互To fine-tune how this type of cross-filtering and cross-highlighting works, see Visual interactions

后续步骤Next steps

与筛选器和突出显示交互(使用“阅读视图”)Interact with filters and highlighting (in Reading View)

向报表添加筛选器(使用“编辑视图”)Add a filter to a report (in Editing View)

了解报表筛选器Take a tour of report filters

更改报表视觉对象相互交叉筛选和交叉突出显示的方式Change how report visuals cross-filter and cross-highlight each other

了解有关 Power BI 中的报表的详细信息Read more about reports in Power BI

更多问题?More questions? 尝试参与 Power BI 社区Try the Power BI Community