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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ania26
Helper III
Helper III

Color in Dax

Nr of Failed Tests () = IF([Nr of Failed Tests]=0,"",IF([Nr of Failed Tests]>0,"( "&[Nr of Tests]&" , "&[Nr of Failed Tests]&" )"))
 
Hello, how make this part in black color &[Nr of Tests]& and this one in orange &[Nr of Failed Tests]&? 
1 ACCEPTED SOLUTION
AlexTheGreat
Resolver II
Resolver II

Hi,

You could use additional formatting.
with 2 rules applied:
measure_count_failed <= 0 --> apply color black
measure_count_failed > 0 --> apply color orange

You can also create a measure but in this case you only need a measure that counts the failed cases.

Hope it helps!

View solution in original post

2 REPLIES 2
AlexTheGreat
Resolver II
Resolver II

Hi,

You could use additional formatting.
with 2 rules applied:
measure_count_failed <= 0 --> apply color black
measure_count_failed > 0 --> apply color orange

You can also create a measure but in this case you only need a measure that counts the failed cases.

Hope it helps!

Chanty4u
Regular Visitor

Create two measures and apply each 

Nr of Tests Display = [Nr of Tests]

Nr of Failed Tests Display = [Nr of Failed Tests

]

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.