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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Hari01
Frequent Visitor

Formatting single row data using column data

Hi

 

I have table viz and sample is like below. All products are categories into 3 and they are A, B and C.  I have to formate font or bacground color of rows for Category A.

 

Is it possiable in Power BI to formate some rows based on column Category data ?

 

IDNameCategory
1SofaB
2ChairA
3Glass TableC
4Table TopC
5Writing DeskB

 

Thanks in advance! 

1 ACCEPTED SOLUTION
v-yadongf-msft
Community Support
Community Support

Hi @Hari01,

 

Please try following DAX to create a new measure:

Measure = IF(MAX('Sheet1'[Category]) = "A","yellow")

 

Right click and select "Conditional formatting":

vyadongfmsft_2-1664869498928.png

Select "Field value" - "Measure" (just created):

vyadongfmsft_3-1664869575750.png

Result you want:

vyadongfmsft_4-1664869644592.png

Best regards,

Yadong Fang

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

View solution in original post

2 REPLIES 2
v-yadongf-msft
Community Support
Community Support

Hi @Hari01,

 

Please try following DAX to create a new measure:

Measure = IF(MAX('Sheet1'[Category]) = "A","yellow")

 

Right click and select "Conditional formatting":

vyadongfmsft_2-1664869498928.png

Select "Field value" - "Measure" (just created):

vyadongfmsft_3-1664869575750.png

Result you want:

vyadongfmsft_4-1664869644592.png

Best regards,

Yadong Fang

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

sevenhills
Super User
Super User

It can be done by adding a measure, which is explained in the link: https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting
Section: Color-code based on text

Hope this helps!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.