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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
LamdaLamda
Microsoft Employee
Microsoft Employee

Conditional formatting of Measure in a Table

Hi All,

 

Is it possible to conditionally format a measure inside a table visual?  I have pulled 5 metrics into my table visual, all are measures, and am looking to format my last two columns to show Red if negative and Green if positive.  I have worked the logic to where I think it should be but nothing ever happens.  I use the rule option and put if greater = to 0 and less than (maximum) and the 2nd rule just says less than 0 turn a different color.  The two columns are a % though - not sure if that helps.  Is it possible to do this with a measure inside of a table visual?  

 

Thanks!

7 REPLIES 7
Greg_Deckler
Super User
Super User

Should be possible, would need to see some screen shots of how you have setup conditional formatting and maybe some sample data to recreate. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hello - the formatting link above seems outdated - I don't see the ability in rules to specify if its a number, %, etc.  

 

As per a screenshot - here is the filter i'm trying to apply:

 

formatting.PNG

My field in the table i'm trying to change is Net Revenue.  It is a percentage - currently the field shows 156%.  So i'm trying to simply say if the % is greater than or = to 0 - make the background, or even font color I don't care, set to Green and if below zero - as my other column i'd like to use the same formatting on is -56% - set it to Red.  So a really simple condition that says if is zero % or above Green, negative then Red.  

 

When I click OK it goes back to the table and nothing happens.  Any thoughts?

 

 

 

dax
Community Support
Community Support

Hi @LamdaLamda , 

I am not clear about your requirement and data structure, if possible could you please inform me more detailed information(such as your expected output and your sample data, you could use virtual data instead of real data)? Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

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

LamdaLamda
Microsoft Employee
Microsoft Employee

I figured it out on my own - the issue is that PBI will not include conditional formatting of a table if there is no category included in it.  My group just wanted 5 KPI's so it would not work.  You have to include some type of category/main point to the table like company, area, something to tie it altogether.  This should be an upgrade - the need for a category or supporting column to allow conditional formatting makes no sense.  Just allow people to format a metric, column, etc.  however they want - don't force another dimension onto it.

enough info to make a suggestion?

bump

amitchandak
Super User
Super User

Refer:https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.