Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

livio218526
Contributor

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

 

7 Replies
Channa
Valued Contributor III

Re: Extended Color for a Drill Down Dimension

try using AND

 

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

just an idea

Channa
Channa
Valued Contributor III

Re: Extended Color for a Drill Down Dimension


if(Dimensionality()=1 and v_SelectedDIM='PRODOTTO' and [Prod Liv I]='RAMO III',,RGB(151,255,255),if(Dimensionality()=2 and v_SelectedDIM='PRODOTTO' and [Prod Liv I]='RAMO III',,RGB(151,255,255),RGB(0,238,0)))

 

 

try this it will work by ur dimensions 1st dimension and color  2nd and color

sample just idea

Channa
livio218526
Contributor

Re: Extended Color for a Drill Down Dimension

No, in this way not work!!

I would like to have color for the 1st level of drill down dimension and another color for the second. I have to choose the color of both level and they must be different from each other. The first level has values of different colors and the second level also has values of different colors.

livio218526
Contributor

Re: Extended Color for a Drill Down Dimension

Thank you so much, I just solved the problem by myself 🙂

skurella
New Contributor

Re: Extended Color for a Drill Down Dimension

Hello Livio,

 

Can you please help me understand how do you achieve this.

 

Thanks,

Sunil

Partner
Partner

Re: Extended Color for a Drill Down Dimension

Hi Livia, 

 

Can you please explain here how you achieved the different colour for different dimension?

 

Thankyou 🙂

rups
New Contributor

Re: Extended Color for a Drill Down Dimension

can you tell me how did you solve the problem of color in case of a drilldown.