表格中的条件格式设置Conditional formatting in tables

通过表格的条件格式设置,你可以根据单元格值指定自定义单元格背景色,包括使用渐变色。With conditional formatting for tables, you can specify customized cell background colors based on cell values, including using gradient colors. 若要访问条件格式,请在 Powr BI Desktop“可视化效果”窗格的“字段”格中,选择要设置其格式的“值”格中值旁边的向下箭头(或右键单击该字段)。To access conditional formatting, in the Fields well of the Visualizations pane in Power BI Desktop, select the down-arrow beside the value in the Values well that you want to format (or right-click the field). 只能管理“字段”格的“值”区域中字段的条件格式。You can only manage conditional formatting for fields in the Values area of the Fields well.

在随即显示的对话框中,可以配置颜色,以及最小和最大值。In the dialog that appears, you can configure the color, as well as the Minimum and Maximum values. 如果选择“散射”框,还可以配置一个可选的“居中”值。If you select the Diverging box, you can configure an optional Center value as well.

应用到表后,使用上述步骤应用的自定义格式将替代应用到已进行条件格式设置的单元格的任意自定义表格样式。When applied to a table, the customized formatting applied using the steps outlined above overrides any custom table styles applied to the conditionally formatted cells.

若要从可视化效果中删除条件格式,只需再次右键单击该字段,并选择删除条件格式即可。To remove conditional formatting from a visualization, just right-click the field again, and select Remove Conditional Formatting.