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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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