Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
biggusdoggus
Not applicable

QlikSense Server - colour measure by expression in line chart

Hey all

Hopefully a really simple question (Google has not been my friend with this).

I have 3 measures in a line chart  - MTD 2015, MTD 2016 and MTD Target 2016.

The "Auto-colour" is pretty average - so I want to set the colours for each of these measures by expression.

What would the expressions be please? I just can't get it to work.

thanks

7 Replies
lironbaram
Not applicable

Re: QlikSense Server - colour measure by expression in line chart

hi

right now you'll need to use 2 dimensions

the second one will be a synthetic dimension with the measures names

and then you use one expression that is built like this

if Syndim='MTD2015' , sum(salesLY) etc...

then in the color expression you'll be able to reference the Synthetic dimension

if Syndim='MTD2015' , blue() etc...

shraddha_g
Not applicable

Re: QlikSense Server - colour measure by expression in line chart

Create 2nd Dimension using Valuelist('MTD 2015','MTD 2016','MTD Target 2016')

in Measure :

pick(wildmatch(Valuelist('MTD 2015','MTD 2016','MTD Target 2016'),'MTD 2015','MTD 2016','MTD Target 2016'),

Expression for MTD 2015,

Expression for MTD 2016,

Expression for MTD Target 2016

)

in Color by Expression

pick(wildmatch(Valuelist('MTD 2015','MTD 2016','MTD Target 2016'),'MTD 2015','MTD 2016','MTD Target 2016'),

RGB Value for MTD 2015,

RGB Value for MTD 2016,

RGB Value for MTD Target 2016

)

rohitk1609
Not applicable

Re: QlikSense Server - colour measure by expression in line chart

Hi shraddha.g, Could you provide any sample application where your above mentioned logic got implemented ?

nareshguntur
Not applicable

Re: QlikSense Server - colour measure by expression in line chart

Did you check this -

Qlik Sense: How to set custom colors by measure in a bar chart

I hope this holds good for Line Chart as well.

Cheers

Naresh

biggusdoggus
Not applicable

Re: QlikSense Server - colour measure by expression in line chart

Thanks Naresh - unfortunately it doesn't as that's for Desktop, not Server.

Thanks though.

shraddha_g
Not applicable

Re: QlikSense Server - colour measure by expression in line chart

Hello Rohit,

PFA simple application where I have used this logic.

rohitk1609
Not applicable

Re: QlikSense Server - colour measure by expression in line chart

This is no application available as attachment