7 Replies Latest reply: Oct 18, 2016 2:42 AM by Yeo Poh sai

# How to change my expression generate 5 different color to 1 color from dark to light ?

Hi All

I have the below expression from shraddha it work fine :-

Pick(Rank(\$(vEPS)), lightred(),yellow(),blue(),green(),lightgray(),cyan())

When i try to assign Highest value with light red , and i have problem in assign the next color for 2nd highest value.

Can some one share with me , How to make it only 1 color , higher ranking number dark red , and slowly the color change to become lighter color. So user able to visualise  the number vari with the color tone.

Hope some one can advise me.

Paul

My QVF

• ###### Re: How to change my expression generate 5 different color to 1 color from dark to light ?

Check colormix() used in background color.

Just change color limits according to your requirement. I have used Green() for max and lightgray() for min

According to these 2 limits it will create color for intermediate values.

I hope it is helpful.

• ###### Re: How to change my expression generate 5 different color to 1 color from dark to light ?

In my actual app , i have more then 6 column , for EPS the expression consider to be very simple , i have other list current ratio give by sunny below, the expression very long and complex. My question to you is it is possible to make use of variable ? So that it become less complicated.

money(

(RangeSum(Above(RangeSum

(Above(

Sum

(

{

<

year, month, aSSET_CURR={aSSET_CURR}

>

}

[Amount])/Rate, 0, RowNo()))),

-

Sum(

{

<

aSSET_CURR={aSSET_CURR}>

}

TOTAL Aggr(Sum(

{

<

year, month, aSSET_CURR={aSSET_CURR}

>

}

[Amount])/Rate, YearMonth

))))

, \$(vMoneyFormatK))

• ###### Re: How to change my expression generate 5 different color to 1 color from dark to light ?

yes it is possible to use variable in colormix().

Where ever I have used EPS expression, just replace it with the variable as \$(vVariable).

It will work.

• ###### Re: How to change my expression generate 5 different color to 1 color from dark to light ?

Lucky , it work . Thank you.  Out of curiosity , may i know why you not make use of the variable function to create the

expression ? I mean it should be more easy to use function , instead you make use of the full manual expression. why ?

Colormix1((

\$(vEPS)

-\$(=min(aggr(

\$(vEPS)

,COMPETITOR_K))))

/

\$(=(max(aggr(

\$(vEPS)

, COMPETITOR_K))

-min(aggr(

\$(vEPS)

, COMPETITOR_K)))),lightgray(),green())

• ###### Re: How to change my expression generate 5 different color to 1 color from dark to light ?

If the expression is complex you can use variable also.

It is up to you whether to use manual expression or variable.

Using variables make it more manageable.