cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Conditionnal Formatting Not Working

Hello,

I have this table:

And i would like it to be like that :

if 'Yes' is inferior or equal to 3% then it's green if it's superior to 3% then it's red
No conditionnal formating for the "No"

my measure used here is :

Number of Tilt = COUNT(Table[Tilt]).

Thanks in advance for you help.

1 ACCEPTED SOLUTION
Community Support

Hi @Anonymous ,

Try the formula like below:

``Number of hilt = CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Tilt]))``
``````%TG =
var sum_ = CALCULATE(SUM('Table'[Value]),ALL('Table'))
return [Number of hilt]/sum_``````
``````M =
IF (
MAX ( 'Table'[Tilt] ) = "No",
"black",
IF ( MAX ( 'Table'[Tilt] ) = "Yes" && [%TG] <= 0.03, "green", "red" )
)``````

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

Best Regards,
Henry

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

2 REPLIES 2
Community Support

Hi @Anonymous ,

Try the formula like below:

``Number of hilt = CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Tilt]))``
``````%TG =
var sum_ = CALCULATE(SUM('Table'[Value]),ALL('Table'))
return [Number of hilt]/sum_``````
``````M =
IF (
MAX ( 'Table'[Tilt] ) = "No",
"black",
IF ( MAX ( 'Table'[Tilt] ) = "Yes" && [%TG] <= 0.03, "green", "red" )
)``````

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

Best Regards,
Henry

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

Anonymous
Not applicable

Hello, thanks for the answer and sorry for my very late reply.

I couldn't check before today because i was busy. (2 weeks university / 2 weeks in company)

Your suggestion worked, i used "Count" instead of sum since i'm counting the number of yes and no.

Sorry again!

And thanks!

Have a nice day.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

#### Power BI Monthly Update - July 2024

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

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors