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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LamdaLamda
Employee
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


@ 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!:
The Definitive Guide to Power Query (M)

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.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors