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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
snifer
Post Patron
Post Patron

choose what row have different color in the matrix

Capture.PNG]

I finally build my matrix I'm happy

now I need to have underlines same row, in this case, I would like to have row 2999- gross profit in other color.. or bold or something to make look different

how i can do in the powerbi matrix?

1 ACCEPTED SOLUTION

Hi @snifer

Modify with this measure, write the "row name" needed to show in the {  } separated by ","

Measure = IF(MAX([parent])in {"2899-gross","1677-cost"},1,0)

10.png

 

 

Best Regards

Maggie

View solution in original post

11 REPLIES 11
v-juanli-msft
Community Support
Community Support

Hi @snifer

You could apply different colors for different rows. modify the measure as below

Measure = SWITCH(MAX([parent]),"2899-gross",1,"1677-cost",2)

then in the "Advanced controls" pane, you could "+" a condition.

16.png

Best Regards

Maggie

@v-juanli-msft

 

Measuretest29999 = IF(MAX(GroupAccounts[Parent+Code+Name])="29999 - Gross profit/loss",1,0)
 
if i wish to use this measure , how i can modify to add other lines
p.s.
all line will be same color

 

Hi @snifer

Modify with this measure, write the "row name" needed to show in the {  } separated by ","

Measure = IF(MAX([parent])in {"2899-gross","1677-cost"},1,0)

10.png

 

 

Best Regards

Maggie

v-juanli-msft
Community Support
Community Support

Hi @snifer

With the Matrix visual, you can apply Conditional formatting (colors and shading) to the background of cells within the matrix, and you can apply conditional formatting to the text and values themselves.

However, it supports in the "Value" field instead of "Row" or "Column" fields.

1.png

refernece:

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-matrix-visual#shading-and-font-colors-with...

 

In the example above, i create a measure

Measure = IF(MAX([parent])="2899-gross",1,0)

then open the "Advanced control" pane

12.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-juanli-msft

 

HI, i don't get how you can apply conditional formatting just to one row or just in 2?

Hi @snifer

Update in my previous post.

Please check.

 

Best Regards

Maggie

@v-juanli-msft

 

if I understood correctly this work just if value 1 is just 1 time in the matrix otherwise will display red all the 1 value.. if so doesn't work for me this solution

Hi @snifer

No,

look

13.png

if you want the row where "parent" ="2899-gross" to be coloreddifferently, you can use this measure

Measure = IF(MAX([parent])="2899-gross",1,0)

then use this measure in the conditional formatting setting.

measure=1 just shows which row you need to color.

 

If you want two rows, you could modify the measure with "||" function.

 

Best Regards

Maggie

@v-juanli-msft

 

so something not right

 

i create the measure 

Measuretest29999 = IF(MAX(GroupAccounts[Parent+Code+Name])="28999 - Gross profit/loss",1,0)
 
then I made the conditional formatting
 
Capture.PNG
but nothing has been colored
keep in mind that i need to make same color for 4 different line, but at this stage, I will be happy at least to have 1 in different color
 
Capture2.PNG

 

@v-juanli-msft

 

i made mistake oon the measure (sorry! 🙂

now is partially working...

the child row are red, but the parent row is still black how I can make it red as well?

 

Capture.PNG

those are all the lines that I need to be colored in red, howIi can add to the measure?

 

29999

Gross profit/loss

53999

Earnings before interest, tax, depreciation and amortization (EBITDA)

56999

Operating profit/loss before special items

57999

Profit/loss before financial items and tax (EBIT)

58299

Profit/loss before financial items and tax (EBIT) after group costs

69999

Profit/loss before tax

89999

Profit/loss for the year

Hi @snifer

Currently, conditional formatting for subtotals in matrix is not supported. 

Here is a idea you could vote.

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/17401381-conditional-formatting-f...

 

You can only have all subtotals in the same format with "Subtotal" or "Field formatting".

 

Best Regards

Maggie

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors