Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a situation where I need 3 colors , Red, white and green in straight table , if the value is increasing it should increase towards green and if the value is decreasing it should be towards red .
for example :
if my expression returns -2 it should be darker red
and if my expression returns -1 it should be less red
same way if my expression returns +2 it should be lighter green
and if my expression returns +4 it should be darker green.
Any help is much appreciated .
Thanks
like this?
See the ColorMix1() and ColorMix2() functions in QV Desktop help. The first one selects a gradient color between two extremes (red and green in your case), the second one allows you to add a third color for the center.
You may have to do some calculations on the expression results to bring them into range, though.
Hi,
You can try ColorMix wizard option in subexpression (background color).
Hi Peter, as suggested I am using colormix function but when I enter my expressions which is the below one
(CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100 . I have expression which is the combination of other column names and variables .
so when I enter the expression using color wizard .my expression is failing.
all I need is 3 colours , Red, white and green .
the below expression is what I am getting if I use colormix wizard :
ColorMix1 ((1+Sign(2*((CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100-RangeMin (top(total (CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100,1,NoOfRows(total))))/(RangeMax (top(total (CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100,1,NoOfRows(total)))-RangeMin (top(total (CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100,1,NoOfRows(total))))-1)*Sqrt(Fabs((2*((CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100-RangeMin (top(total (CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100,1,NoOfRows(total))))/(RangeMax (top(total (CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100,1,NoOfRows(total)))-RangeMin (top(total (CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100,1,NoOfRows(total))))-1))))/2, ARGB(255, 255, 0, 0), ARGB(255, 0, 255, 0))=(CurrentMonth-CompareTO)/$(vlob) *$(vlob2)*100
can you correct if i am doing anything wrong , I followed the default options in the colormix wizard
In the ColorMix wizard, disable "Auto Normalize" and especially disable "Enhanced colors". That makes your output simpler and more manageable.
First, you'll have to decide on expected min/max values.
Best,
Peter