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
Anonymous
Not applicable

Conditional Formatting Not Working

Hello all,

 

First off I am new to Power BI so if this is a simple explanation I apoligize. I tried googling and could not really find a solution.

 

I have a table vizualization that I would like to conditionally format one column to display an amber exclamation point if the value is greater than 14 and less than 31, and display a red X if the value is greater than 31. I have enetered the parameters to do this (or so I thought) and it seems to do nothing. Please see screen shot.

 

Days vacant.png

 

Any help is much appreciated!

TIA

 

@edhans 

1 ACCEPTED SOLUTION

@Anonymous 

 

Yeahh, you have Row with Spaces in that column you need to cleaned before.

 

One way is create a new Column :

 

DaysOpennedModified=IF(ISERROR(VALUE('HR'[Days Openned])),BLANK(),'HR'[Days Openned]) , now this column you can change to Whole Number.

 

Regards

 

Victor

 




Lima - Peru

View solution in original post

31 REPLIES 31
Vvelarde
Community Champion
Community Champion

@Anonymous 

 

Hi, the key is your Data Type's Column. You see numbers but in the data model are declare it like String / Text Type.

 

To change to Number Data Type please follow this:

 

Select your column from Fields (Right Panel) , Go To Modeling --Data Type --Whole Number.

 

Regards

 

Victor




Lima - Peru
Anonymous
Not applicable

Thank you @Vvelarde 

 

I tried this, when I try to covert it to whole number I get the error "Cannot convert value '' of type Text to type Integer."

 

Any suggestions?

 

Thanks

@Anonymous 

 

I will checked if your columns Days Open had Text Character in any row , like Letters, Spaces or anything that can't transform in Integer Type.




Lima - Peru

@Anonymous @Vvelarde i'm unable to understand why it is relvent to convert it to number without knowing what is the requirement. @Anonymous you have to help us to get help.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k 

 

The requirement is  that I have a table vizualization that I would like to conditionally format one column to display an amber exclamation point if the value that is in the column is greater than 14 and less than 31, and display a red X if the value is greater than 31. Based on SUM not COUNT

 

@Anonymous in your original post image you were using count and that's why I was asking. Answer thsi question if your data is like this. (always share data) to explain 

 

Day Number

10

10

10

20

20

20

30

 

So do you want compare 10, 20, 30 with your condition or you want to compare sum of 10+10+10 = 30, 20 + 20 +20 (60 ) and 30. these are two different things. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I apologize if it was confusing, this is still new to me

 

From you example, I want compare 10, 20, 30 with the condition.

 

To give some background, this column represents the number of days a job has been vacant. I so I want to flag them with Icons when they reach a certain number of days that they have been vacant.

@Anonymous this is my last message on this topic, because I don't think I can help, until you can share your pbix file (ofcourse remove sensitive information before sharing) otherwise we will keep on going in circles. Sorry buddy. There are tons of awesome people who can help.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous can you remove first blank() condition and then check, wondering if you are having blank values.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

my conditional formatting not working for column however same formatting working fine for another column with same data type

I have used Divide() function to arrive at % value

Anonymous
Not applicable

I removed the rule related to blank values and still nothing

@Anonymous can you drop your measure that one you are using for conditional formatting in a table visual and see what result you are getting. without seeing the data it is hard to say what is going on. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I added it to a new vizualization and now it is only working for a few of the values, very strange

 

new cond form.png

@Anonymous are you showing cout of days opened in your image which doesn't seems to be the case because it doesn't looks like a number. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

You can see on the left, Days Openned is a number in the column

Hi @Anonymous,

 

I just generated the same exmaple here below

help003_conditionnal formatting.png

 

1- Make sure to select Sum from the list based on field

2- No need to set a higher value in the second condition replace 99999 by 100 and replace number by percent

 

Try it and let me know your feedback 

Anonymous
Not applicable

It does not give me the option of sum, only count. How can I change it so I can have sum as an option?

 

conf form 2.PNG

@Anonymous i don't it is a number but tht is not important, you haven't dropped any aggregation that you are using in condition formatting, you are missing the point here. Do following, add a measure

 

Days Count = COUNT ( Table[Your days column] )

 

in table visual, drop above measure in your visual and see what values you are getting and that is getting used for conditional formatting. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Ahh I see, I need to change it from Count to Sum, but it wont let me select anything other than count.

 

conf form 2.PNG

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.