Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Create a DAX measure that returns a color code based on the row’s Description.
Example (adjust text values exactly as in your data):
Row Color =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table'[Description] ) IN {
"A. INCOME",
"B. TRADING / MANUFACTURING EXPENSES",
"C. GROSS PROFIT (A-B)",
"E. TOTAL (C+D)",
"G. PROFIT FROM BUSINESS (E-F)",
"I. PROFIT AFTER INTEREST (G-H)",
"K. PROFIT BEFORE TAX (I+J)",
"L. PROFIT AFTER TAX (L-M)"
}, "#C00000", -- Red
"#000000" -- Black (default)
)
For Table or Matrix:
Select the visual
Go to Format pane → Cell elements (or Conditional formatting)
Choose:
Font color (or Background color if you prefer)
Click fx
Set:
Format by: Field value
Based on field: Row Color
Summarization: First
Now only those specific rows will appear in red.
Hi @rajasekaro,
I would also take a moment to thank @danextian , @JamieHolding, @cengizhanarslan, @rohit1991 for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Regards,
Community Support Team.
Hi @rajasekaro
If you're going to use a table visual, @cengizhanarslan 's suggestion would work. However, if this will be in a matrix, conditionally formatting row and column headers is not currently supported - the same color will be applied to the whole headers.
Further to what others have said, if you're working with a matirx, you can go on
Format>Visual>Cell elements>Font Color
This requires a field to be in the Values section of Build, and allows you to format the text based on other fields.
Create a DAX measure that returns a color code based on the row’s Description.
Example (adjust text values exactly as in your data):
Row Color =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table'[Description] ) IN {
"A. INCOME",
"B. TRADING / MANUFACTURING EXPENSES",
"C. GROSS PROFIT (A-B)",
"E. TOTAL (C+D)",
"G. PROFIT FROM BUSINESS (E-F)",
"I. PROFIT AFTER INTEREST (G-H)",
"K. PROFIT BEFORE TAX (I+J)",
"L. PROFIT AFTER TAX (L-M)"
}, "#C00000", -- Red
"#000000" -- Black (default)
)
For Table or Matrix:
Select the visual
Go to Format pane → Cell elements (or Conditional formatting)
Choose:
Font color (or Background color if you prefer)
Click fx
Set:
Format by: Field value
Based on field: Row Color
Summarization: First
Now only those specific rows will appear in red.
Hii @rajasekaro
In Power BI, you can color a specific cell by using Conditional Formatting based on a rule or a helper measure. In a Table or Matrix visual, go to Format pane >> Conditional formatting >> Background color (or Font color), choose Format by = Rules or Field value, and define a condition (for example, when Description = "GROSS PROFIT" or when a value > 0). If the condition is met, Power BI applies the color only to that cell. Power BI does not allow manual cell-by-cell coloring, so conditional formatting is the correct and supported way to achieve this.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |