Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor

Colour by expression within a drill down graph

Hi 

I've created a drill down bar chart that shows the number of deliveries that are On Time or Late.  If, for example, I select Late, this will then break into sub categories showing how late it was - eg up to 60 minutes late.  The graph seems to work as I want it to, however, when I drill down to the sub categories the graph remains all one colour.

I've used Master Dimensions for each level of the drill down and assigned the colours there - as you can see in the second chart, it knows there are 2 segments to display, just that the colours don't update.

Any help would be greatly appreciated.

Thanks 

Sarah

 

Top Level ViewTop Level ViewBy Sub Category (current)By Sub Category (current)By Sub Category (Required)By Sub Category (Required)

2 Replies
Highlighted
Valued Contributor III

Re: Colour by expression within a drill down graph

try

 

if(Dimensionality()=1 and sum(Sales)<150,RGB(151,255,255),if(Dimensionality()=2 and sum(Sales)<=20,RGB(0,238,0),if(Dimensionality()=3 and Sum(Sales)<=20,RGB(255,130,171))))

Channa
New Contributor

Re: Colour by expression within a drill down graph

Hi Channa

I'm having trouble understanding the below and how to use it in my example.  Do you put this in the colour by expression section?

Would you be able to provide an example of how Dimensionality() works as part of a bar chart and it may help me to map it across to the data I'm using?

Thanks

Sarah