Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Hi Srihari
Change your text format expression to this:
IF([Percentage]>25,'<B>')
The only thing that was missing is singlesitations around the tag.
That worked 🙂
Thanks
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!
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."