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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. 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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.