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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
tomshaw83
Helper I
Helper I

Conditional Format Measure

Hi all,

 

I have a table in PowerBi which has fields as below. I would like to conditionally format the response from the table to show the 'good' values as green and 'bad' values as red. The issue is that these vary dependent on value - 9 sleep is very good, whereas 9 stress is very bad. Is there a way to apply specific conditional formats to specific rows in PowerBi using a measure?

 

  Day 1Day 2Day 3
SleepUser 1979
StressUser 1931
SleepUser 2471
StressUser 2811
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @tomshaw83 ,

You can refer the following links to get it:

Apply conditional formatting in tables and matrixes

yingyinr_0-1670837449050.png

yingyinr_1-1670837569309.png

Power BI: Using a measure to set up conditional formatting

yingyinr_3-1670837786893.png

Conditional Formatting based on calculated measure

 

Measure = var V=CALCULATE(SUM('Table'[Value]))
return IF(V>R[R Value],"#FD625E",
            IF(V>[A Value]&&V<R[R Value],"#F2C80F",
                IF(V>G[G Value]&&V<R[R Value],"#01B8AA")))

 

If the above ones can't help you, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @tomshaw83 ,

You can refer the following links to get it:

Apply conditional formatting in tables and matrixes

yingyinr_0-1670837449050.png

yingyinr_1-1670837569309.png

Power BI: Using a measure to set up conditional formatting

yingyinr_3-1670837786893.png

Conditional Formatting based on calculated measure

 

Measure = var V=CALCULATE(SUM('Table'[Value]))
return IF(V>R[R Value],"#FD625E",
            IF(V>[A Value]&&V<R[R Value],"#F2C80F",
                IF(V>G[G Value]&&V<R[R Value],"#01B8AA")))

 

If the above ones can't help you, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

FreemanZ
Community Champion
Community Champion

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.