Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
prananellutla
Creator
Creator

Color expression based on rank(measure)by row

Hi Can we color the background cell in a table

I want to rank the measure in for each(Title col) using colormix gradient.

I am trying to work with this code here

Colormix(aggr(rank(sum([# Apps])),[Row dimension]),,RGB(67,89,56),RGB(x,y,z)

sample data.

  

titleJanFebMarAprMayJunJulAugSepOctNovDec
A387817974254286437502454704265516499
B1,3491,5018198061,1188157352,6691,5056096751,302
C19,71618,17717,08216,17019,12421,19720,41720,96321,11318,21916,83815,830

Something like attached.

Rank 1 in each row will be one color,rank 2 in each row will be second color etc.

  

thanks

12 Replies
prananellutla
Creator
Creator
Author

I think the earlier code is also working. the reason it highlighted only sept was i was choosing only sept dates. Sorry about that

I  understood the behavior after i included the another child diemension

. and thankyou for the code againimg2.jpg

vkish16161
Creator III
Creator III

Good to know

Also,

Alt(

Pick (

HRank(Sum([# Applications])) , RGB(221,217,196), RGB(197,217,241), ("IN THIS ORDER")

)

, BLACK ())


This should take care of a default color to be applied when there's no output for the Pick to resolve.

PuriVelasco
Creator
Creator

Hi Sunny, 

do you how removed the null values that are out the rank?

I have the Include Zero Values unchecked and the dimensions without null values but I still have null values how it is been in below image.

PuriVelasco_0-1605703312978.png

The column with null values is a measure which uses a rank function.

Thank you very much!