cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

Conditionnal Formatting Not Working

Hello, 

I have this table:

 

Aho00_2-1651224739842.png

 

And i would like it to be like that : 

 

Aho00_4-1651224894001.png

 

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
v-henryk-mstf
Community Support
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" )
)

 

vhenrykmstf_0-1651558566151.png

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.

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
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" )
)

 

vhenrykmstf_0-1651558566151.png

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.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors