Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Qliksense - can a color expression be a master item measure ?

I have been using qlikview for a while, started experimenting with qliksense. Going through new to videos and stumbled when I tried to add a color expression ( example from the demo video -

pick(match("OICA region", 'Africa', 'Americas', 'AOME', 'Europe'), 'springgreen', 'lightskyblue', 'violet', 'lightsalmon' ) )  as master item and tried to use it on the chart color expression, which didn't work. Is this feature supported by qliksense ? or i am doing something wrong here ?

2 Replies
rsw
Contributor II

Re: Qliksense - can a color expression be a master item measure ?

Hi,

I don't think the feature you are after is supported as yet. What you could do though is add your color expression as a variabler. That would have much the same outcome as adding it to the master library as you would only have to edit it once to make a change regardless of how many places you use it. You can access the variable editor via the little "x=" button towards the bottom left of the page and create a variable, e.g. vExpressionColor, give it the definition of your "pick" statement and then evaluate the variable in the color expression e.g. $(vColor).

Hope that is useful.

ogster1974
Honored Contributor II

Re: Qliksense - can a color expression be a master item measure ?

Master Items cannot be used directly in expressions yet.  This is your issue.

You could however use a variable to do what you are looking for.  If you look for the demos of the latest Sense release Mike uses colour setting as an example using variables.