Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
livio218526
Creator
Creator

Extended Color for a Drill Down Dimension

Hi everyone,
I created a drill down dimension that produced a level of view from a second point of view.

Below is the image and the reference code:

1.JPG

1. Level:

 =if(v_SelectedDIM='PRODOTTO',[Prod Liv I],
if(v_SelectedDIM='CANALE',[Rete di Vendita],[Ramo Ministeriale]))

2. Level:

 

=if(v_SelectedDIM='PRODOTTO',[Prod Liv II],
if(v_SelectedDIM='CANALE',[Rete di Vendita],[Ramo Ministeriale]))

v_SelectedDIM is a varible used to choose the point of view (PRODOTTO or CANALE).

 

 

I assign the drill down dimension to the graph so I can drill, but I lose color after drilling.
I want to customize the colors and, at this moment, I use an expression:

 

=
IF([Prod Liv I]='RAMO III', rgb(0,32,96),

If([Prod Liv I]='RAMO I', rgb(141,194,223),

if([Prod Liv I]='MULTIRAMO', rgb(0,84,150),

if([Prod Liv I]='PREVIDENZA',rgb(0,108,36),

if([Prod Liv I]='NON MOTOR', rgb(129,154,201),

if([Prod Liv I]='MOTOR', rgb(203,27,56),

if([Prod Liv I]='LEGATI AL CREDITO', rgb(236,169,0),

if([Prod Liv II]='SINTONIA', rgb(236,169,255),



if([Rete di Vendita]='CAPTIVE', rgb(129,154,201),

if([Rete di Vendita]='EXTRA CAPTIVE', rgb(236,169,0),

if([Rete di Vendita]='PROMOTORI',rgb(203,27,56)

))))))))))

)

 

The chart is:

2.JPG

 

In this way, however, I only take into account the first level and, after making a click on the graph, I have all the blocks with the same color.

For example, by clicking on "RAMO III":

3.JPG

 

Is there a way to customize the color of the following levels?

 

Thanks,

Livio

 

Labels (3)
1 Reply
Channa
Specialist III
Specialist III

try

 

if(Dimensionality()=1 and [Prod Liv I]='RAMO III', rgb(0,32,96),

IF(Dimensionality()=2 and [Prod Liv I]='RAMO III', rgb(0,32,96)

 

Dimensionality=1 means first dimension 2 means second dimension try

 

may be

 

 

Channa