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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Conditional formatting min & max

Hello, I would like to color the maximum data in a table in green and the minimum data in red. The table has 1500 rows and I want the formatting to be present on the "supplier" and "CA N" column, from the max and min value of the "Var.CA" column. Can you help me? THANKS. 

Greg0ry_0-1727773502328.png

 

 

1 ACCEPTED SOLUTION
joaoribeiro
Impactful Individual
Impactful Individual

Hi @Anonymous , you can use the measure below as basis to create the conditional formatting, then apply it in the columns you want to have the formatting using the option 'Field value', as shown below:

Conditional Formatting = 

VAR _max_value =
    MAXX(
        ALLSELECTED('Table'[Supplier]),
        [Var.CA]
    )
    
VAR _min_value =
MINX(
    ALLSELECTED('Table'[Supplier]),
    [Var.CA]
)

RETURN
    SWITCH(
        [Var.CA],
        _max_value, "Green",
        _min_value, "Red"
    )

 

joaoribeiro_0-1727776509170.png

joaoribeiro_1-1727776523670.png

 

 


Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you Joao!

joaoribeiro
Impactful Individual
Impactful Individual

Hi @Anonymous , you can use the measure below as basis to create the conditional formatting, then apply it in the columns you want to have the formatting using the option 'Field value', as shown below:

Conditional Formatting = 

VAR _max_value =
    MAXX(
        ALLSELECTED('Table'[Supplier]),
        [Var.CA]
    )
    
VAR _min_value =
MINX(
    ALLSELECTED('Table'[Supplier]),
    [Var.CA]
)

RETURN
    SWITCH(
        [Var.CA],
        _max_value, "Green",
        _min_value, "Red"
    )

 

joaoribeiro_0-1727776509170.png

joaoribeiro_1-1727776523670.png

 

 


Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors