Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

kizzydavies
Contributor

How can I make font or chart colour conditional in Qlik Sense?

Hello,

Is there any way to make the colour of the font in a text chart (or even better the background colour itself) change in accordance with the calculation?

For example, if the expression delivers a minus amount I would like this to show in RED, if the expression delivers a plus amount I would like this in GREEN.

I have found calculation for QLIK View but it does not work, it just replaces the calculation with words RED or GREEN.  Below if the calculation I tried on a text chart.


if((Sum({$<[Requisition Status]={Closed}>}[Number of Filled Reqs])-1)>0,'Green','Red')


Thanks,


Kizzy

1 Solution

Accepted Solutions

Re: How can I make font or chart colour conditional in Qlik Sense?

I see, I misunderstood. You are using a "Text & Image" object which does not provide for conditional colors.  You might try switching to a KPI object which does provide conditional color.

-Rob

15 Replies

Re: How can I make font or chart colour conditional in Qlik Sense?

You could use similar for BG and Font color in text object. But, The statement you are creating flag not the function. Perhaps this?

if((Sum({$<[Requisition Status]={Closed}>}[Number of Filled Reqs])-1)>0,Green(),Red())

Life is so rich, and we need to respect to the life !!!
kizzydavies
Contributor

Re: How can I make font or chart colour conditional in Qlik Sense?

Hi Anil,

Please could provide instructions on how to do this.

Thanks,

Kizzy

Re: How can I make font or chart colour conditional in Qlik Sense?

Not sure, What instruction you are expecting here? If you want to work then i would request application

Life is so rich, and we need to respect to the life !!!
kizzydavies
Contributor

Re: How can I make font or chart colour conditional in Qlik Sense?

Hi Anil,

How to insert a Text Object and add an expression to make it change colour based on the result of the expression.  I have looked at other questions on the same topic and they say that text objects cannot be conditionally coloured. 

Thanks,

Kizzy

Re: How can I make font or chart colour conditional in Qlik Sense?

I think, there is limit Options using that? Can you share application Will test the same

Life is so rich, and we need to respect to the life !!!
kamalqlik
Valued Contributor

Re: How can I make font or chart colour conditional in Qlik Sense?

Hi Kizzy,

Please share the application , we will surely provide the solution to you.


Regards

Kamal

kizzydavies
Contributor

Re: How can I make font or chart colour conditional in Qlik Sense?

Hi Kamal,

I am unable to share as some of the data contains employee data.  Is there any other way this can be resolved?

Thanks,

Kizzy

Re: How can I make font or chart colour conditional in Qlik Sense?

You posted a Qlik Sense question in a forum called "New to QlikView".

If you want more feedback from Qlik Sense experts, you may want to move this discussion to the New to Qlik Sense forum by following the steps outlined here: QlikCommunity Tip: How to move your discussion thread

Thanks.

Re: How can I make font or chart colour conditional in Qlik Sense?

For a table chart, use the Background Color property.  The value should be a color function eg Red() as Anil showed in his example.

Note that if you are testing a value in a column, there is no need to repeat the expression that calculated the value.  You can use the column(n) function as a shortcut.

if(Column(2) > 0, Green(), Red())

The first Measure column is 1, the second 2 and so on.

2018-01-12_6-59-28.png

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

Community Browser