Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next 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

Reply
rajasekaro
Helper II
Helper II

How to Give A color for specific cell

hi team,

rajasekaro_0-1768976210959.pnglike this i want to give 

 

1 ACCEPTED SOLUTION
cengizhanarslan
Super User
Super User

1) Create a color measure

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)
)

 

2) Apply it to the visual

For Table or Matrix:

  1. Select the visual

  2. Go to Format pane → Cell elements (or Conditional formatting)

  3. Choose:

    • Font color (or Background color if you prefer)

  4. Click fx

  5. Set:

    • Format by: Field value

    • Based on field: Row Color

    • Summarization: First

Now only those specific rows will appear in red.

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

View solution in original post

5 REPLIES 5
v-hjannapu
Community Support
Community Support

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.

danextian
Super User
Super User

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.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
JamieHolding
Resolver I
Resolver I

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. 

cengizhanarslan
Super User
Super User

1) Create a color measure

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)
)

 

2) Apply it to the visual

For Table or Matrix:

  1. Select the visual

  2. Go to Format pane → Cell elements (or Conditional formatting)

  3. Choose:

    • Font color (or Background color if you prefer)

  4. Click fx

  5. Set:

    • Format by: Field value

    • Based on field: Row Color

    • Summarization: First

Now only those specific rows will appear in red.

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.
rohit1991
Super User
Super User

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.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.