Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
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
Partner - Master III
Partner - Master III

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
Partner - Master III
Partner - Master III

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
Master
Master

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

NareshGuntur
Partner - Specialist
Partner - Specialist

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

Anonymous
Not applicable
Author

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

Thanks though.

shraddha_g
Partner - Master III
Partner - Master III

Hello Rohit,

PFA simple application where I have used this logic.

rohitk1609
Master
Master

This is no application available as attachment