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
Anonymous
Not applicable

Conditional Formatting Matrix or Table Help

Hello,

 

Just a quick help here.

So I have this table.

111111.PNG

And on my Report I summarize it by product and qty.

41232131.PNG

The one i got stuck is, i want to highlight the product that is the Highest Hour.

In this example the highest hour is Hour 5, and on hour 5, product E and F needs to be highlighted.

 

Let me know if this is possible.

2 ACCEPTED SOLUTIONS
mahoneypat
Microsoft Employee
Microsoft Employee

You need to generate a column to hold the hour value in integer format, so that you can compare the max hour for each product to the overall max in your color measure.

 

For example 

Color Measure = IF(MAX(Table[Hour]) = CALCULATE(MAX(Table[Hour]), ALL(Table[Product])), "Yellow", "White")

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

Icey
Community Support
Community Support

Hi @Anonymous ,

 

Please check:

Measure 1 =
IF (
    MAX ( 'Table'[Hour] )
        = CALCULATE ( MAX ( 'Table'[Hour] ), ALLSELECTED ( 'Table'[Product] ) ),
    "Yellow"
)
Measure 2 =
IF (
    MAX ( 'Table'[Hour] )
        = CALCULATE ( MAX ( 'Table'[Hour] ), ALLSELECTED ( 'Table'[Product] ) ),
    1
)

conditional formatting.gif

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Please check:

Measure 1 =
IF (
    MAX ( 'Table'[Hour] )
        = CALCULATE ( MAX ( 'Table'[Hour] ), ALLSELECTED ( 'Table'[Product] ) ),
    "Yellow"
)
Measure 2 =
IF (
    MAX ( 'Table'[Hour] )
        = CALCULATE ( MAX ( 'Table'[Hour] ), ALLSELECTED ( 'Table'[Product] ) ),
    1
)

conditional formatting.gif

 

 

Best regards

Icey

 

If this post helps, then consider Accepting it as the solution to help other members find it faster.

mahoneypat
Microsoft Employee
Microsoft Employee

You need to generate a column to hold the hour value in integer format, so that you can compare the max hour for each product to the overall max in your color measure.

 

For example 

Color Measure = IF(MAX(Table[Hour]) = CALCULATE(MAX(Table[Hour]), ALL(Table[Product])), "Yellow", "White")

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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 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.

Top Solution Authors