Argb() to assign the colours required by the ColorMix2() function
This Colour Picker page helps to select the appropriated values for the Argb() function.
You may need the functions RangeMax() and RangeMin() to keep your Profit Percentage between -1 and 1, e.g. -100% and +100%
Now these are the steps to implement the colour feature in your map.
Expand the Layers > Countries (I assume that is the name of the dimension in your map) > Colors > Set it to Custom > Select by expression in the dropdown > enter your ColorMix2() function, mine looks like this:
I usually help myself by adding a table with minimum to columns, the first for the countries and the second with the expression being used with the ColorMix2 function, so, when I was preparing my reply I had a table and its second column was the expression I posted above, e.g. You should do something similar; remember, the expression MUST return a percentage, e.g. values between -1 and 1, all the spectrum: -1, -0.9, -0.8 .... 0 ... 0.8, 0.9 and 1, so the idea of the table is assisting you to implement the ColorMix2 function and validate the results, you could even set the background colour
(Sum(Sales) - Sum(Cost)) / Sum(Sales)
Arnaldo Sandoval A journey of a thousand miles begins with a single step.