Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

arvindjha2050
New Contributor II

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

Tags (1)
2 Replies
devarasu07
Honored Contributor II

Re: Custom Color in Treemap

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

Re: Custom Color in Treemap

Hi,

Refer to the attached sample, Tks

Capture.JPG

Community Browser