Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
paulyeo11
Valued Contributor II

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
Honored Contributor III

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

13 Replies
paulyeo11
Valued Contributor II

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

shraddha_g
Honored Contributor III

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.

paulyeo11
Valued Contributor II

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

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
Honored Contributor III

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.

paulyeo11
Valued Contributor II

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

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
Honored Contributor III

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

paulyeo11
Valued Contributor II

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

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
Honored Contributor III

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

paulyeo11
Valued Contributor II

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

Hi shraddha

I have try , still display blank.

Paul