Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem using the sting containing single qoute

Hello,

I am trouble with a record name which having   '  

This is name of the field --------   Care Transitions (reporting Oct '14)

I wrote an expression like this :

=if(DChart='Care Transitions (reporting Oct '&chr(39)&'14)',count({< [CAHPS Count Flag]={1}, [CAHPS Chart Domain]={'Care Transitions (reporting Oct '&chr(39)&'14)'}, [CAHPS Questions Flag]={1}, [$(vDateType) $(vDateUnit)],

  [Numeric $(vDateType) $(vDateUnit)]={">=$(=num(Max([Numeric Previous-x $(vDateType) $(vDateUnit)])))<=$(=Max([Numeric $(vDateType) $(vDateUnit)]))"}

  >} Distinct [Survey ID]),0)

This expression is working with other filed names but not for the 'Care Transitions (reporting Oct '14)' . I tried to replace single qoute in the filed name with chr(39) but no luck.

Is there any mistake in that expression?? Please help

Thanks in advance!!

5 Replies
Anonymous
Not applicable
Author

Try to replace the outer single quotes with double quotes:

...Chart="Care Transitions (reporting Oct '14)",cou....

Not applicable
Author

Kim,

Thanks for your reply

Unfortunately its a name of the particular record but not a field name. But I tried with double qoutations too and it didn't help

a_mullick
Creator III
Creator III

I'm not sure but in the set analysis try:

...[CAHPS Chart Domain]={"Care Transitions (reporting Oct '14"}...

or store the field name in a variable:

vFieldName = 'Care Transitions (reporting Oct ' & chr(39) & '14)'

and try:

...[CAHPS Chart Domain]={vFieldName}...

Azam

Anonymous
Not applicable
Author

I can't find an actual error in the expression, but this workaround _should_ work (if the rest of the expression is OK:

if(Replace(DChart, chr(39), '') ='Care Transitions (reporting Oct 14)

Anonymous
Not applicable
Author

But that will of course not work in the Set Analysis..