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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
jtj
Frequent Visitor

How to color a field in a row inside a table in PowerBI?

I want to color each field with the biggest value green within each row. How can I do this? Without doing it manuelly. I think it has something to do with Conditional formatting?

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

Hi @jtj 

 

@Uzi2019 @KeyurPatel14 Thank you very much for your prompt reply. Please allow me to share other methods here.

 

If your source data is in the following format, perform the unpivot operation.

 

vnuocmsft_0-1715931267404.png

 

Select Transform data to enter Power Query.

 

vnuocmsft_3-1715931484978.png

 

vnuocmsft_1-1715931325345.png

 

You'll get:

vnuocmsft_2-1715931375384.png

 

Create a measure.

 

Measure = 
VAR RowMax = CALCULATE(MAX('Table'[Value]), FILTER(ALL('Table'), 'Table'[Category] = MAX('Table'[Category])))
RETURN
IF(SELECTEDVALUE('Table'[Value]) = RowMax, "GREEN", "WRITE")

 

Create a matrix.

 

vnuocmsft_4-1715931647290.png

 

vnuocmsft_5-1715931709089.png

 

vnuocmsft_6-1715931805991.png

 

Here is the result.

 

vnuocmsft_7-1715931855321.png

 

Regards,

Nono Chen

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

4 REPLIES 4
v-nuoc-msft
Community Support
Community Support

Hi @jtj 

 

@Uzi2019 @KeyurPatel14 Thank you very much for your prompt reply. Please allow me to share other methods here.

 

If your source data is in the following format, perform the unpivot operation.

 

vnuocmsft_0-1715931267404.png

 

Select Transform data to enter Power Query.

 

vnuocmsft_3-1715931484978.png

 

vnuocmsft_1-1715931325345.png

 

You'll get:

vnuocmsft_2-1715931375384.png

 

Create a measure.

 

Measure = 
VAR RowMax = CALCULATE(MAX('Table'[Value]), FILTER(ALL('Table'), 'Table'[Category] = MAX('Table'[Category])))
RETURN
IF(SELECTEDVALUE('Table'[Value]) = RowMax, "GREEN", "WRITE")

 

Create a matrix.

 

vnuocmsft_4-1715931647290.png

 

vnuocmsft_5-1715931709089.png

 

vnuocmsft_6-1715931805991.png

 

Here is the result.

 

vnuocmsft_7-1715931855321.png

 

Regards,

Nono Chen

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

 

 

 

jtj
Frequent Visitor

It seems like the awnser is to make a matrix instead of a table.

Uzi2019
Super User
Super User

hi @jtj 

 

Please check the below video for better understanding.

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

 

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

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

 

 

I hope above videos would help you to understand the conditional formatting setting for Matrix visual.

 

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

Hello @jtj ,
Hope you are doing well.

 

Could you please share the sample file?

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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