I used this - along with my Sales measure:
Colormix1((sum([Sales])-$(=min(aggr( sum([Sales]), CategoryName))))/$(=(max(aggr( sum([Sales]),CategoryName))
-min(aggr( sum([Sales]), CategoryName)))),$(vBlue),$(vSalmon))
EDIT: I assume you are using this code in the color by expression area and you have the expression is a color code checked?
See attached example - I actually defined this in a variable - so you will see the definition in the variables interface.
If you can, attach your app and I can take a look.
Please copy .qvf file to your C:\Users\<user profile>\Documents\Qlik\Sense\Apps and refresh Qlik Sense Desktop with F5
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.
2.1 Features_s.qvf 318.0 K
I tried your formula but it is not working.
Enclosed you find my app.
At this moment I'm working in the desktop version so I think it's not possible to make a variable there?
Test fictieve data.qvf 171.5 K