Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

change the Text format to bold based on expression

Hi,

I have a requirement to change the text color and format based on a condition.

I have gone through the forum here and solved them except the text format.

This is the condition :

Percentage between 15-25% - yellow background & red plain font - I am able to do this now

Percentage greater than 25% - pink background & red bold font -- I am not able to get the font to bold

Please find the sample attached.

Again, there is an issue , as it is already stated as a bug , i am getting the default colour in the first line to the header. If there is any resolution let me know.

Thanks,

Srihari

6 Replies
gandalfgray
Specialist II
Specialist II

You can set those things in Chart Properties > Visual Cues:

Not applicable
Author

Yes..that will work..

But is there any option we can set at the expression level.

I mean in the Expressions can we use TEXT FORMAT option to do this ?

Thanks,

Srihari

Not applicable
Author

Hi Srihari

Change your text format expression to this:

IF([Percentage]>25,'<B>')

The only thing that was missing is singlesitations around the tag.

Not applicable
Author

That worked 🙂

Thanks

jonathandienst
Partner
Partner

Srihari

Yes you can.

Use an expression like for Text Format:

=If(Percentage > 0.25, '<B>')

And for Background Color:

=If(Percentage > 0.25, RGB(255, 128, 128))

And for Color:

=If(Percentage > 0.25, RGB(255, 0, 0))

Adjust the expressions as necessary to fit your data. Adjust the colours as per your needs.

Jonathan

Edit - beaten to the punch!

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gandalfgray
Specialist II
Specialist II

John and Jonathan are right.

QV Ref manual is wrong:

"The expression used as text format expression should return a string containing a B for bold text, I for italic text and/or U for underlined text."

ought to be corrected to:

"The expression used as text format expression should return a string containing a <B> for bold text, <I> for italic text and/or <U> for underlined text."