Color conditional formmating in formula

Searching the forum I found the undocumented function _Color.

Has anyone used this before? I’m unable to get any color change with it.

For example, if a value is less then 4 I would like the text to be red.

I have tried both of these but the text color does not change.

SwitchIf(Average([Work-Life].[Work-Life]) < 4, _Color("red", Average([Work-Life].[Work-Life])))

SwitchIf(Average([Work-Life].[Work-Life]) < 4, _Color("#ff0000", Average([Work-Life].[Work-Life])))
1 Like

Interesting. I use it in every single doc I make. Mostly to color button text

_color(“#628dbd”, “text”) is my personal favorite.

The only thing I’ve noticed is that it doesn’t always reliably work on non-text values. So make sure to use toText() if the value you are attempting to Color is a date or something.

2 Likes

Thank you. That explained it.

It was a number. I used ToText and it is working correctly.

3 Likes