Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to write if condtion with strang containing single quote.

Hi All,

I am writing if condition in dimension side but that string already contains special character.

Ex :

if(Particulars='Shareholder's Loans' but it is not giving result because that string already contains single quote.

Hot to avoid it.QlikTech Admin

6 Replies
MVP
MVP

Try using double quotes, like:

If( particulars= "Shareholder's Loans" ....

try with if(Particulars="'Shareholder's Loans'"


double quotes indicates strings ..

Partner
Partner

if(Particulars="Shareholder's Loans" , <some expression>, <some expression>)

MVP
MVP

Or, use chr(39) for single apostrophe, like:

If(Particulars = 'Shareholder'&chr(39)&'s Loans' , ....

Hi,

Try this

If(Particulars='Shareholder'& chr(39) &'s Loans' )

Great dreamer's dreams never fulfilled, they are always transcended.
Partner
Partner

Hi,

Replace the single quotes in both places

If(Replace(particulars,Chr(39),'')= 'Shareholders Loans' ....