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

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


1 Solution

Accepted Solutions
shraddha_g
Partner - Master III
Partner - Master III

Try this

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

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

View solution in original post

13 Replies
paulyeo11
Master
Master
Author

My QVF  Doc

shraddha_g
Partner - Master III
Partner - Master III

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.

paulyeo11
Master
Master
Author

Hi Shraddha

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

shraddha_g
Partner - Master III
Partner - Master III

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

paulyeo11
Master
Master
Author

Hi Shraddha

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

shraddha_g
Partner - Master III
Partner - Master III

Try this

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

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

paulyeo11
Master
Master
Author

Hi Shraddha

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

shraddha_g
Partner - Master III
Partner - Master III

Try like this

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

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

paulyeo11
Master
Master
Author

Hi shraddha

I have try , still display blank.

Paul