Forum Discussion
Anonymous
5 years agoNot applicable
Text in red colour, based on first letter in string
Hi, I am looking for a way to change the colour of the tex string in column CODE_VLGN_ACTION in red if the value starts with a C of J. Is there a way to do so? Thanks! John
- 5 years ago
Anonymous
You can add the below measure and apply CF on the Font with Rule as follows. You can also add other letters if requiredCF = INT(LEFT( MAX(Table[CODE_VLGN_ACTION]) , 1 ) IN {"C","G"})
MariaP
Solution Supplier
5 years agoHi Anonymous
Try adding this column:
FindSubstringColour = IF(LEFT(YourTable[CODE_VLGN_ACTION],1) = "C",1, IF(LEFT(YourTable[CODE_VLGN_ACTION],1) = "J",1, 0 ))
Then go to Conditional Formatting - Select your field and apply font Colour to your column using Format by Rules based on Field "FindSubstringColour".
Add rule:
If Value is 1 Number then Choose your colour Red
I have tried this on a sample (searched for first letter A or first letter D and it worked.)
- Anonymous5 years agoNot applicable
perfect, thanks!