13 Replies Latest reply: Oct 17, 2016 8:08 AM by Yeo Poh sai

# QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

Hi All

I need to PE and EPS and Current Ratio automatic give the coloring.

For example if user select APPLE and Google.

Make those higher value items row with Dark Blue and those with lower value Light Blue , so user can see the different , and know google stock is better then apple.

Paul

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

My QVF  Doc

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

you can do it in color by expression by setting the range for particular expression or comparing 2 expressions and according to that give rgb value.

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

I cannot set the value range ( as the number keep vari ) , because i just want to compare which on is high value the color is Dark Blue , and lower value is light blue .

Paul

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

calculate max and min of the expression using AGGR() and then try to assign color.

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

Can you give me an example ?

Below is the Earning Per Share expression :-

Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)}

,

month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}

>} EPS)

May i know how to modify the expression , change to AGGR and assign color ?

Paul

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

Try this

if( expression = max(aggr(Expression,Dimension)) , rgb() ,

if(expression = min(aggr(Expression,Dimension)) , rgb() , white())

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

My expression below  :-

Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)}

,

month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}

>} EPS)

I replace by variable = \$(vEPS) , it work fine .

if( expression = max(aggr(Expression,Dimension)) , rgb() ,

if(expression = min(aggr(Expression,Dimension)) , rgb() , white())

I apply into your recommendation expression above :-

if( =\$(vEPS) = max(aggr(=\$(vEPS),COMPETITOR_k)) , rgb() ,

if(=\$(vEPS) = min(aggr(=\$(vEPS),COMPETITOR_k)) , rgb() , white())

it display blank . any where i go wrong ?

Paul

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

Try like this

if( \$(vEPS) = max(aggr(=\$(vEPS),COMPETITOR_k)) , rgb() ,

if(\$(vEPS) = min(aggr(=\$(vEPS),COMPETITOR_k)) , rgb() , white())

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

I have try , still display blank.

Paul

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

Remove '=' sign from inside Aggr()

if( \$(vEPS) = max(aggr(\$(vEPS),COMPETITOR_k)) , rgb() ,

if(\$(vEPS) = min(aggr(\$(vEPS),COMPETITOR_k)) , rgb() , white())

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

I think still have some error on the expression , as it still display blank.

Paul

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

Have you checked what are the values for   max(aggr(\$(vEPS),COMPETITOR_k)) and  min(aggr(\$(vEPS),COMPETITOR_k))

• ###### Re: QS How to create Visual Cues when value is higher it color black group color Dark Blue and lower value with Light Blue ?

For below expression :-

min(aggr(\$(vEPS),COMPETITOR_k))

it also return null value.

Paul