Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

While defining colors for a field how do i define color for a field which has a calue like this : " Can't Predict" ?

We use single quotes ( '  ' )  to define a value and assign it a color . But what if the value itself has a single quote inside it . How do we define it .

ex: I want to define color for a value : ( Can't Predict) .

Please help.

4 Replies
m_woolf
Master II
Master II

Something like:

if(Field = 'Can' & chr(39) & 't Predict',rgb(122,135,223))

vishsaggi
Champion III
Champion III

Hello Ankit,

Try below at let me know...

In the expression tab -> Click on + and then write this expression in Background.

= if(StrValue = 'Can' & Chr(39) & 't Predict', Red(), Blue())

Thanks,
V.

jonathandienst
Partner - Champion III
Partner - Champion III

You can escape the single quote by doubling it:

if(Field = 'Can''t Predict',rgb(122,135,223))

(that's 2 single quotes, not a double quote)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Mark_Little
Luminary
Luminary

Hi,

If you're not sure what the value with ' in will be, could you Use the replace() or  PurgeChar() function first?

Take it out of the equation.

Mark