設定資料表格式化的條件Conditional formatting in tables

設定資料表格式化的條件時,您可以根據資料格值指定自訂資料格背景色彩,包括使用漸層色彩。With conditional formatting for tables, you can specify customized cell background colors based on cell values, including using gradient colors. 若要存取條件式格式設定,請在 Power 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.