Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

beck110979
Valued Contributor III

Color for expression

Hi Folks,

i have a question, can i give to my expressions (for instance i got 2 Expression and one Dimension) the coloring via variable.

my first Expression is Gesamtkosten and Colorexpression is RGB(249, 63, 23)

my second Expression is Leistungsstand and Colorexpression is RGB(90, 45, 79)

both Colorexpressions i saved in script.

my Dimension is Year.

in Qlik View i can give to each of my expression the colorexpression via variable. But how can i give the color expression via variable to every expression within my dashboard. in Tab: Appearance i tried to implement this settings but i did not solve this issue.

Does anybody have any idea?

thanks a lot

Beck

20 Replies
brunobertels
Valued Contributor

Re: Color for expression

Hi

May be this will help you

I wrote this doc few months ago

https://community.qlik.com/docs/DOC-16046

brunobertels
Valued Contributor

Re: Color for expression

Hi again

In fact you may find the response here below , see my response in this article

https://community.qlik.com/message/1078261#1078261

(exemple is for 3 mesure )

the principe is to

Set your dimension normally YEAR

Add second dimension like this

ValueList('mesure1','mesure2')


then add mesure

if(ValueList('mesure1','mesure2')='mesure1'

  ,$(Gesamtkosten)

  ,if(ValueList('mesure1','mesure2')='mesure2'

     ,$(Leistungsstand)

     )

  )

and now set the color like this

if(ValueList('mesure1','mesure2')='mesure1'

  ,rgb(130,51,0)

  ,if(ValueList('mesure1','mesure2')='mesure2'

     ,rgb(240,220,130)

         )

  )

you can also create a variable with the color expression and call it in the color panel :

Hope it helps

beck110979
Valued Contributor III

Re: Color for expression

Hi Bruno,

first of all, thanks a lot for your feedback, i got a question, do you use any extensions in your example app?

Thanks a lot

Beck

beck110979
Valued Contributor III

Re: Color for expression

Hi Bruno,

can i use the ValueList-function with expressions as well?

Thank a lot

Beck

brunobertels
Valued Contributor

Re: Color for expression

Hi

No i did not use extension in this exemple

brunobertels
Valued Contributor

Re: Color for expression

Hi

Yes you can

beck110979
Valued Contributor III

Re: Color for expression

Hi Bruno,

i think , i am missing something, i create Barchart, in Barchat i can use 2 Dimension and 1 Expression, and if i use 1 Dimension so i can use a few Expression, mainpoint is i was not able to ValueList, if i use ValueList so i have second dimension, i want to have only one dimension.

Do you any example ti this issue?

Thanks a  lot

Beck

brunobertels
Valued Contributor

Re: Color for expression

can you share your QVF so that i will have a glance i try to fix the issue

beck110979
Valued Contributor III

Re: Color for expression

Hi Bruno.

thanks a lot

here is my example

Thanks a lot for your help