Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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)
9 Replies
Channa
Specialist III
Specialist III

try using AND

 

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

just an idea

Channa
Channa
Specialist III
Specialist III


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
Creator
Creator
Author

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
Creator
Creator
Author

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

skurella
Contributor
Contributor

Hello Livio,

 

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

 

Thanks,

Sunil

shima_hish
Partner - Contributor II
Partner - Contributor II

Hi Livia, 

 

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

 

Thankyou 🙂

rups
Contributor
Contributor

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

kalyanamharish
Contributor III
Contributor III

Hi @livio218526  Can you please share the solution code, so that we all can get benefited by it.

akshay_chavan
Contributor II
Contributor II

Hi @livio218526 ,

 

Can you please tell us how you do that OR share a code or steps to achieve this requirement.

Thanks in advance!!!

 

Regards,

Akshay Chavan