Forum Discussion

Ania26's avatar
Ania26
Helper IV
1 year ago
Solved

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]&? 
  • 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!

2 Replies

  • Chanty4u's avatar
    Chanty4u
    Frequent Visitor

    Create two measures and apply each 

    Nr of Tests Display = [Nr of Tests]

    Nr of Failed Tests Display = [Nr of Failed Tests

    ]

  • 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!