Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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

1 Solution

Accepted Solutions
paulyeo11
Master
Master
Author

7 Replies
paulyeo11
Master
Master
Author

My QVF

shraddha_g
Partner - Master III
Partner - Master III

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.

paulyeo11
Master
Master
Author

Hi Shraddha

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))

shraddha_g
Partner - Master III
Partner - Master III

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.

paulyeo11
Master
Master
Author

Hi shraddha

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())

shraddha_g
Partner - Master III
Partner - Master III

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.

paulyeo11
Master
Master
Author

Hi Shraddha

Thank you for your sharing. Now i understand , to you there is no different , to me it is a lot of different.

Paul