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

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

Reply
pang22
Helper III
Helper III

Add color in row for PowerBI matrix

Hello,

I made a color in Excel pivot table for Country and Factory.

 

In PowerBI matrix, how to add the color for Country and Factory resoectively?

 

PowerBI matrix:

Country: CN

Facctory: QN

pang22_0-1727337217860.png

pang22_1-1727337234841.png

 

Excel pivot table:

pang22_2-1727337281004.png

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi,

Thanks for the solution Uzi2019 offered, and i want to offer some more information for user to refetr to.

hello @pang22 , you can consider to use the conditional formatting for it, you can refer to the following solution.

Create a measure.

 

Measure = SWITCH(TRUE(),ISINSCOPE('Table'[Factory]),"grey","pink")

 

Then put it to the background color in conditonal formatting of the value.

vxinruzhumsft_0-1727404740603.png

 

vxinruzhumsft_1-1727404750733.png

 

Outptut

vxinruzhumsft_2-1727404764863.png

 

vxinruzhumsft_3-1727404771132.png

 

But please notice that when you expand it , the color of subtotal for each level will return the default value.

vxinruzhumsft_4-1727404822022.png

After testing, it cannot set the color for the subtotal for each level by condition. 

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Uzi2019
Super User
Super User

Hi @pang22 

 

Check below video for better understanding

https://www.youtube.com/watch?v=wTRrskQzAHk

 

https://www.youtube.com/watch?v=FSTiPm5tY8A

https://www.youtube.com/watch?v=WF7fCAmjjZc

 

 

I hope above videos would help you to do formatting row wise.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.