Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
arvindjha2050
Creator
Creator

Custom Color in Treemap

Hello Team,

In Treemaps i want to achieve the below scenario :

Dimension :Category

Measure : sum(Sales)

Suppose we have 4 categories Paints,Consumer Durables,Electricals and Chocolates

We want custom colors based on sales.

For example for category with highest number of sales it should be green ,

then for 2nd highest it should be another color and so on.

All will be specified by rgb() feature.

I tried various options but to no avail.

Thanks,

Arvind

2 Replies
devarasu07
Master II
Master II

Hi,

you can try like this

write background color expression on your sales measure

if( Rank(sum(Sales),Category)<=1,rgb(0,128,0),

if( Rank(sum(Sales),Category)<=2,rgb(128,128,0),

rgb(255,255,0)))

Thanks,
Deva

devarasu07
Master II
Master II

Hi,

Refer to the attached sample, Tks

Capture.JPG