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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.