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: 
MuraliPrasath
Creator III
Creator III

Renaming field value

Hi,

How to rename below value to 'North, Korea', I've to change this for in Country Column.

Due to single quote in text I can't handle this one. Can someone help me on this?

[Korea, Democratic People's Republic of]   

 

Tried the this one but not working....
pick (WildMatch(Country,''Korea, Democratic People's Republic of,'*'),
'North, Korea',Country) as Country,

Labels (4)
1 Solution

Accepted Solutions
ArnadoSandoval
Specialist II
Specialist II

Hi @MuraliPrasath 

Tricky because you are trying to match a text with quotation characters, like the comma and apostrophe, in this cases you use the CHR function to provide the code, look at the code below; char(44) is a comma (,) and chr(39) is an apostrophe (')

Countries:
Load LoadId,
     Country As Load_Country,
     WildMatch(Country,'Korea' &chr(44)&' Democratic People' & chr(39) & 's Republic of') As WM,
     If(WildMatch(Country,'Korea' &chr(44)&' Democratic People' & chr(39) & 's Republic of'), 'North, Korea', Country) As Country
     Inline [
LoadId| Country
1| France
2| Korea, Democratic People's Republic of
3| China
] (delimiter is '|');

 Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.

View solution in original post

2 Replies
ArnadoSandoval
Specialist II
Specialist II

Hi @MuraliPrasath 

Tricky because you are trying to match a text with quotation characters, like the comma and apostrophe, in this cases you use the CHR function to provide the code, look at the code below; char(44) is a comma (,) and chr(39) is an apostrophe (')

Countries:
Load LoadId,
     Country As Load_Country,
     WildMatch(Country,'Korea' &chr(44)&' Democratic People' & chr(39) & 's Republic of') As WM,
     If(WildMatch(Country,'Korea' &chr(44)&' Democratic People' & chr(39) & 's Republic of'), 'North, Korea', Country) As Country
     Inline [
LoadId| Country
1| France
2| Korea, Democratic People's Republic of
3| China
] (delimiter is '|');

 Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
MuraliPrasath
Creator III
Creator III
Author

thank you! this is perfectly working!