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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Conditional formatting with measure as rule

Hello.

I have a table with a calculated numeric column, and I want to conditionally format it based on a measure. That is, for each case, if the value of the column is greater than that of the measure, the value in the table will have one color and if it is less it will have another. The problem is that when applying conditional formatting it only lets you enter a numerical value, not a measure. Is there a way to get it?

Thank you.

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @Syndicate_Admin 

You can create a "flag" measure that will check your condition and return 1 /0.
For example :

Flag condition = if(SELECTEDVALUE('Table'[column])>[measure test],1,0)
and then based on this measure modify conditional formatting:
Ritaf1983_0-1692362243917.png

Link to a sample file 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Hi @Syndicate_Admin 
As on the desktop, it works the same way in the service.
Try deleting and republish/ switching workspaces / refreshing the page.

Try to press "edit" and check conditional formatting settings on service 

Ritaf1983_1-1692621198257.png

 

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Hello again.

Everything is perfect in Desktop but when I upload it as a service the conditional formatting disappears. Any ideas?

Hi @Syndicate_Admin 
As on the desktop, it works the same way in the service.
Try deleting and republish/ switching workspaces / refreshing the page.

Try to press "edit" and check conditional formatting settings on service 

Ritaf1983_1-1692621198257.png

 

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @Syndicate_Admin 

You can create a "flag" measure that will check your condition and return 1 /0.
For example :

Flag condition = if(SELECTEDVALUE('Table'[column])>[measure test],1,0)
and then based on this measure modify conditional formatting:
Ritaf1983_0-1692362243917.png

Link to a sample file 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.