在 Power BI Desktop 中使用钻取Use drillthrough in Power BI Desktop

通过在 Power BI Desktop 中使用钻取,可以在报表中创建一个侧重于特定实体(如供应商、客户或制造商)的页。With drillthrough in Power BI Desktop, you can create a page in your report that focuses on a specific entity - such as a supplier, or customer, or manufacturer. 在此针对性报表页上,用户可以右键单击其他报表页上的数据点,并钻取到具有针对性的页,来获取对此上下文进行筛选后的详细信息。With that focused report page, users can right-click on a data point in other report pages, and drillthrough to the focused page to get details that are filtered to that context.

使用钻取Using drillthrough

若要使用钻取,请创建一个具有视觉对象的报表页,在该视觉对象中,你希望看到要为其提供钻取的实体类型)。To use drillthrough, create a report page that has visuals you'd like to see about the type of entity for which you'll provide drillthrough. 例如,如果你有兴趣为制造商提供钻取,则可能会创建一个包含视觉对象的钻取页,其中显示总销售额、总出货量、按类别筛选的销售额、按地区筛选的销售额等等。For example, if you're interested in providing drillthrough for manufacturers, you might create a drillthrough page with visuals that show total sales, total units shipped, sales by category, sales by region, and so on. 这样一来,当你钻取到该页时,视觉对象将特定于你单击并选择钻取数据的制造商。That way, when you drillthrough to that page, the visuals will be specific to the manufacturer you clicked on and selected to drillthrough about.

然后,在该钻取页上“可视化效果”窗格的“字段”部分,将你要钻取数据的字段拖动到“钻取筛选器”框中。Then on that drillthrough page, in the Fields section of Visualizations pane, drag the field you want to drillthrough about into the Drillthrough filters well.

将字段添加到“钻取筛选器”框中后,Power BI Desktop 会自动创建“返回”按钮视觉对象。When you add a field to the Drillthrough filters well, Power BI Desktop automatically creates a back button visual. 该视觉对象在已发布的报表中变成一个按钮,使在 Power BI 服务中使用报表的用户可轻松返回到原始报表页(他们选择进行钻取的页)。That visual becomes a button in published reports, and lets users who are consuming your report in the Power BI service easily get back to the report page from which they came (the page from which they selected to drillthrough).

由于“返回”按钮是一个图像,可以使用你想要的任何图像来替换此视觉对象的图像,而且它仍然可以作为按钮正常运行,让报表使用者返回到原始页面。Since the back button is an image, you can replace the image of that visual with any image you want, and it will still operate properly as the button to get report consumers back to their original page. 若要为“返回”按钮使用你自己的图像,只需在钻取页上放置一个图像视觉对象,然后选择视觉对象,并启动“返回”按钮滑块。To use your own image for a back button just place an image visual on the drillthrough page, then select the visual, and put the Back button slider to on. 这将使你的图像作为“返回”按钮运行。That makes your image function as a back button.

当“钻取”页完成时,如果用户在你的报表中(报表使用你在钻取页上“钻取筛选器”框中输入的字段)右键单击数据点,上下文菜单会随即出现,以便用户钻取到该页。When your drillthrough page is complete, when users right-click on a data point in your report that uses the field you put into the Drillthrough filters well on your drillthrough page, a context menu appears, letting the users drillthrough to that page.

当用户选择钻取时,会对该页进行筛选,显示他们右键单击的数据点的相关信息。When they choose to drillthrough, the page is filtered to show information about the data point from which they right-clicked. 例如,如果他们右键单击有关 Contoso(制造商)的数据点,并选择钻取,那么他们所转到的钻取页将被筛选到 Contoso。For example, if they right-clicked on a data point about Contoso (a manufacturer), and selected to drillthough, the drillthrough page they were taken to would be filtered to Contoso.

备注

只有“钻取筛选器”框中的字段才会被传递到钻取报表页。Only the field that is in the Drillthrough filters well gets passed through to the drillthrough report page. 不会传递其他上下文信息。No other contextual information is passed.

这就是在报表中使用钻取的全部内容。And that's all there is to using drillthrough in your reports. 通过这个有用的方法,用户可以获取选择用于钻取筛选器的实体信息的扩展视图。It's a great way to get an expanded view on the entity information you select for your drillthrough filter.