Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nsm1234567
Creator II
Creator II

Conditional colours in combo chart for year-on-year analysis

Hi there,

I've been battling with a request from a user and thought I'd ask the community before giving up.  I'm trying to achieve something it is extremely straightforward when using Qlikview.  What I want Qliksense to be able to do:

Select Dim3 = 'X' makes "This Year" bar black and LY symbol is red

clipboard_image_0.png

Select Dim3 = 'Y' makes "This Year" bar green while LY symbol remains red.

clipboard_image_1.png

The attached .QVF is what Qliksense does with this, where the same colour is applied to both expressions.  I've tried all kinds of tricks to replicate the result above with no luck.  Has anyone needed to do something like this before?  I don't mind a hacky solution if it works.  The user would like the chart colour to change based on the brand selected, but if the colours of the expressions are identical it impacts readability of the chart.  It seems like something that should be super straightforward but I haven't been able to get it right in Qliksense

 

 

Labels (1)
2 Replies
_armoco_
Partner - Creator II
Partner - Creator II

Hi,

Have you tried creating Master measures?

clipboard_image_0.png

 

Here is what I did:

1. Create TY measure in master and when you do, mention its color as Black

clipboard_image_1.png

2. Do the same for LY and make its color as Red.

3. Now in the Colors and legends tab, set it to multicolored and Use library colors option to 'Measure'

clipboard_image_2.png

Now you have different colors for both LY and TY even on selection.

Regards,

Arjun

nsm1234567
Creator II
Creator II
Author

Hi there,

Yes, I've made different attempts using the master items but the example you've shown isn't the behaviour I want.  The app I've created caters for multiple companies.  The user has asked if when a particular company is selected, the colour scheme can change to reflect that company's dominant colours.  It seems though that it's not possible to do this without also then changing the LY colour.

The issue with setting the colour on the master item is that the master item's colour can't itself be based on an expression.  So for your example, I can't say, "If Brand 'A' is selected, the colour should be Green, but if Brand 'B' is selected the colour should be blue."  I can only consistently colour the bars according to the colour library.

That's what I'm trying to convey with the Qlikview example where this is super simple because each expression can have a colour expression