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

Set Font Colour within Concat expression

Hi,

I have the following expression : concat(distinct name, ', ')

Is it possible to set the colour of each 'name' when it is displayed depending on a condition.  For Example if the expression lists : Name1, Name2, Name3

could I turn the colour of Name2 to Red if a variable 'vNumber' is less than 'Target' ?

Many thanks

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Yes, click on the + in front of the expression and select Text Color. You can then enter an expression in the Definition field: if(vNumber<Target, red())

If that didn't work we need more information. Please post a sample document:

Preparing examples for Upload - Reduction and Data Scrambling.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi thanks for your reply.

What I am trying to acheive is this  :

concat_required_look.png

But by using your example - the whole 'cell' text has turned one colour or another.  Please see attached file.

Many thanks again.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

No, that's not possible. The concatenated string is only one string, only one value. That's why it can have only one background or text color.


talk is cheap, supply exceeds demand
Not applicable
Author

I thought so - is there another way of showing this (eg, in seperate cells)?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Yes, with each value in a separate cell you can give each value its own color. In your sample document you will need to select only one month. Or you have to change the if condition because for each target-name combination there are months where Number < Target and months where Number > Target. And one cell can't have two colors at once so you'll have to make sure there's no ambiguity.


talk is cheap, supply exceeds demand