Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

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  FineCapture.PNG

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

Capture1.PNG

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
zhadrakas
Specialist II
Specialist II

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

View solution in original post

kunkumnaveen
Specialist
Specialist
Author

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.

 

 

View solution in original post

2 Replies
zhadrakas
Specialist II
Specialist II

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
kunkumnaveen
Specialist
Specialist
Author

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.