# Qlik Sense App Development

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

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Valued Contributor

## What is the correct approach?

Hi ,

I have to get done Cell colored in green for  top 5 percentage values

Expression:

if(Dimensionality()=1 ,

if(rank(sum({<Year={\$(vMaxCY)}>}Volume)
/
(sum({<Year={\$(vPreCY)}>}Volume))-1)<=5,green(),rgb(201, 219, 189)

),rgb(201, 219, 189)  )

Expression is Working  Fine

But when i tried to expand any value the color getting disappear

So what correction should i need to do in my expression so that the color of Dimensionality 1 should remain green (861.08,49.08,34.52,14.55,9.73),even though the values are expanded  .

2 Solutions

Accepted Solutions
Highlighted
Valued Contributor II

## Re: What is the correct approach?

try this:
if(Dimensionality()=1 AND aggr(rank(sum({<Year={\$(vMaxCY)}>}Volume)/(sum({<Year={\$(vPreCY)}>}Volume))-1), YOUR_FIRST_DIMENSION) <=5
,green()
,rgb(201, 219, 189)
)

regards
tim
Highlighted
Valued Contributor

## Re: What is the correct approach?

Super Tim , it Worked Thanks , but to get colored Top 5 cells ,i need to set as  <=6,  if i set <=5 then only 4 cell r getting green colored.

2 Replies
Highlighted
Valued Contributor II

## Re: What is the correct approach?

try this:
if(Dimensionality()=1 AND aggr(rank(sum({<Year={\$(vMaxCY)}>}Volume)/(sum({<Year={\$(vPreCY)}>}Volume))-1), YOUR_FIRST_DIMENSION) <=5
,green()
,rgb(201, 219, 189)
)

regards
tim
Highlighted
Valued Contributor

## Re: What is the correct approach?

Super Tim , it Worked Thanks , but to get colored Top 5 cells ,i need to set as  <=6,  if i set <=5 then only 4 cell r getting green colored.