Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP 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
tresesco
MVP
MVP

Try using double quotes, like:

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

alexandros17
Partner - Champion III
Partner - Champion III

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


double quotes indicates strings ..

jsingh71
Partner - Specialist
Partner - Specialist

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

tresesco
MVP
MVP

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

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

PrashantSangle

Hi,

Try this

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

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Replace the single quotes in both places

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