There are a couple of ways to do this. One way to place the measure on the color shelf on the marks card. Then, Edit the color legend, right click on it and select Edit Colors... Click Advanced and check Center: 0. Then, check the Stepped Color box and choose 2 Steps.
Another option is to create a calculated field similar to the following and place it on the color shelf:
if sum(Profit)<0 then 'red' else 'green' end
Then, edit the colors accordingly.
Hope this helps!
I am using multiple measures in the text data table and when i apply this formatting it changes the colour for the entire row instead of that specific cell/cells with the negative value.
See attached image for the table .. i want only negative values to be read and others black.
Place Measure Values to the color shelf and edit the color legend as described above.
Hope this works for you!