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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
EaglesTony
Helper V
Helper V

Conditional Coloring not working

Hi,

 

  I had one report working on Conditional Coloring, but this new one I can't seem to get it to do conditional coloring for some reason.

 

  I have a column PCT Complete that in the data is defined as the following:

 

1) Data type: Decimal number

2) Format: Percentage

3) # of decimals: 0

4) Summarization: Sum

5) Data category: Uncategorized

 

  Now for this field on my table visual I have the following conditional formatting for Background Color:

 

EaglesTony_0-1681224576274.png

However all the backgrounds are green, when some have values of 93%(which should be yellow) and 151%(which should be red).

 

1 ACCEPTED SOLUTION
EaglesTony
Helper V
Helper V

I think I found a solution to it.

 

The field PercentComplete is of Data type "Decimal Number" and Format "Percentage" with 0 decimal places.

 

A new field needs to be created to convert this into a whole number (i.e. newfield = PercentComplete * 100) and this new field needs to be of Data type "Whole number" and Format "General" asd Auto as decimal places.

 

In the conditional formatting, I had to use this new field that is a whole number and not the percentage field.

 

View solution in original post

19 REPLIES 19
EaglesTony
Helper V
Helper V

I think I found a solution to it.

 

The field PercentComplete is of Data type "Decimal Number" and Format "Percentage" with 0 decimal places.

 

A new field needs to be created to convert this into a whole number (i.e. newfield = PercentComplete * 100) and this new field needs to be of Data type "Whole number" and Format "General" asd Auto as decimal places.

 

In the conditional formatting, I had to use this new field that is a whole number and not the percentage field.

 

EaglesTony
Helper V
Helper V

Is it working for you ?

EaglesTony
Helper V
Helper V

That I cannot.

 

I think if you build a simple table with 1 row with the attributes mentioned above and then add a table visual to the report.

This works for me:

 

DOLEARY85_0-1681238085884.png

DOLEARY85_1-1681238099256.png

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Rudy_D
Resolver I
Resolver I

Hi,

 

I think it's because you have selected 'number' in your rules :). Everything is green because everything is < 1.

 

If your values are in %, you have to select '%' or you have to work with decimals.

 

Regards.

 

Rudy

Dont think that will work, as my last condition would be > 99 Percent and then what is the other side, as it only allows 100 percent, but I have values as 153 percent.

If you change all of them to Percent values and use percent type in the conditional formatting except for Values over 100% use:

 

>1 Number and <= 100 Percent 

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on LinkedIn

OK. So you have to work with decimals.

Try :

Rule 1 : >=0 & <= 0.76

Rule 2 : > 0.76 & <= 0.99

Rule 3 : > 0.99 & < 10

For Rule #3 you mention 10 would that be then considered 1000% ?

Yes, that's it.

That did not work as I have a few at 25% as yellow and not green, so at 8% as red and not green and one that is 151% as yellow and not red.

 

Here is my setup:

EaglesTony_0-1681235491152.png

 

My field is set to Data Type: Decimal Number, Format: Percentage and no decimal places

Hi, try:

 

>= 0  Percent <=76 Pecent

>76 Percent <= 99 Percent

>1 Number  <=100 Percent

 

You may have to adjust the order to have the last one first but try it in that order to start with

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Thanks, but that did not work and even tried to move them around with no luck.

You may change the Rule no. 3 as follows:

Rule 3 : > 0.99 & <=Max (You have to type Max in the box)

Still no luck after changing..I have something 5% in red and nothing in yellow.

 

Here is the setting (I did change to Max, but when I went back in, this is what it shows):

EaglesTony_0-1681324186755.png

 

Are you able to share the PBIX file?

Did you create a simple table and try to do the conditional formatting on it ?

Yeah, it was very basic with just a unique row and a percentage.

Is it working correctly ?

 

If so, can you share what your field definition is and your conditional rule setup on this field ?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.