Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

combo chart color measures by expression

i'm using a combo chart to display two measures.  the two measure expressions are:

sum(if([Availability woMW Severity]='Major',1,0))

sum(if([Availability woMW Severity]='Minor',1,0))

the resulting graph is:

ss 2015-11-25 at 5.35.33 PM.jpg

i need to assign a specific color to each line.  using the color by expression.  i tried a few iterations of the following, but it's not doing it for me.  any suggestions?

if("Availability woMW Severity"='Major',RGB(255,0,0),if("Availability woMW Severity"='Minor',RGB(255,165,0)))

is there a way to refer to a measure in an expression by using it's label, etc?  i.e. the two measures have labels "Major count" and "Minor count".  wondering if there's a function that allows something along the lines of if(MeasureLabel = "Major count",red,if(MeasureLabel = "Minor count",orange))

10 Replies
GregWP
Contributor II
Contributor II

hi, this would be really useful - is it available yet?

I have a line chart with two measures that show 'Actual LTD' & 'Target LTD' by month. 

I simply want to gray-out those months prior to the current year-month selection. This part I can do ok, but I can't figure how to set a different colour for each measure in the 'else' part of the If statement?