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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.