Qlik Community

Qlik Sense Advanced Authoring

Discussion board where members can learn more about Qlik Sense Advanced Authoring.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

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

 

 

2 Replies
Highlighted
Partner
Partner

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

Highlighted
Creator
Creator

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