Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
Could someone please advise how to adjust the Rank part for colormix2 () to have a gradient starting from 0, not -1? In this case, 0 is the smallest possible number and should be perceived by the function as -1, that is, be in red.
I don't use colormix1 because colours from red to green should go through white colour.
My current results and expression.
=Colormix2 ((Rank(total Sum (Velocity_Sales)))/(NoOfRows(Total)/2), Red(), Green(), white())
Hi, the default formula to convert values to another range is:
(value - min_value) / (max_value - min_value) * (max_range_value - min_range_value) + min_range_value
For a -1 to 1 range it's the same as:
((value - min_value) / (max_value - min_value) * 2) - 1
If you set a predefined range where all values below that range is red, and above is green, it simplifies a lot the calculation, as min_value and max_value will be converted to that fixed numbers.
If you want to get the max a min values you have as the range, the you need to calculated them first to apply them on the formula, just note that in that case, selections can change colors, one value could be white, but if selections changes the values shown, that white could be converted to red or green depending on the new values filtered.
You can also calculate the min and max values on script, and set those values in variables, so you can use them as fixed values.
Hi, the default formula to convert values to another range is:
(value - min_value) / (max_value - min_value) * (max_range_value - min_range_value) + min_range_value
For a -1 to 1 range it's the same as:
((value - min_value) / (max_value - min_value) * 2) - 1
If you set a predefined range where all values below that range is red, and above is green, it simplifies a lot the calculation, as min_value and max_value will be converted to that fixed numbers.
If you want to get the max a min values you have as the range, the you need to calculated them first to apply them on the formula, just note that in that case, selections can change colors, one value could be white, but if selections changes the values shown, that white could be converted to red or green depending on the new values filtered.
You can also calculate the min and max values on script, and set those values in variables, so you can use them as fixed values.
@rubenmarin1 thank you much