Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Colors written in expression

Hello,

I have the following formular running to get a "delay" and "in time" result:

=if(
( NetWorkDays( ( E_WE_Pos.c_Liefertermin), (E_WE_Pos.c_WE_Datum))-1) >2 ,
  'delay', 'in time' )

Its working fine but now I want to have the word "delay" written in RED and "in time" written in GREEN color. Could someone help me if there is an easy way to include the colors directly in the code that I get the result promplty?

Thx & regards

Heiko

5 Replies
MVP
MVP

Re: Colors written in expression

As expression for text coloring (in properties of your table chart for your expression), use something like

=if( ( NetWorkDays( ( E_WE_Pos.c_Liefertermin), (E_WE_Pos.c_WE_Datum))-1) >2 ,

Lightred(),

Lightgreen()

)

Not applicable

Re: Colors written in expression

Hello,

thx for your infirmation. I guess it doesn't give me the result. I understood that this expression works fine if I use that to format a dimension directly.

Th idea is to implement the color directly in the expression that the result comes back in the requested color like:

=if(( NetWorkDays( ( E_WE_Pos.c_Liefertermin), (E_WE_Pos.c_WE_Datum))-1) >2 ,

         red()  'delay',

         green() 'in time'  )

I tried the a.m. version but it doesn't work in theis direction.

Heiko

MVP
MVP

Re: Colors written in expression

Have you tried setting the text color expression within your expression properties section in properties panel of your QlikSense table chart?

TextColorSense.png

nizamsha
Valued Contributor

Re: Colors written in expression

In  Table ,under the measure  in that you have the option Background Color Expression

if( ( NetWorkDays( ( E_WE_Pos.c_Liefertermin), (E_WE_Pos.c_WE_Datum))-1) >2 ,

red(),

green()

)

Not applicable

Re: Colors written in expression

Hello ,

thx for the input. it works now.

Community Browser