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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Remove Apostrophe in the string

I want to group a string into another group using wildmatch but the problem is that this string has a special character inside of it (see code)

=if(WildMatch(Group, 'MARKETING & TRADING ,RESEARCH & DEV'T FEEDSTOCK SUPPLY', )  , 'COMMERCIAL OPERATIONS' , Group)

The MARKETING & TRADING , RESEARCH & DEV'T FEEDSTOCK SUPPLY has a apostrophe between it.

Is there a way around this problem?

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

See if this helps:

If(WildMatch(Group, 'MARKETING & TRADING ,RESEARCH & DEV*'), 'COMMERCIAL OPERATIONS', Group) as Group

View solution in original post

15 Replies
sunny_talwar
MVP
MVP

Since you are using WildMatch, try this (use *)

=If(WildMatch(Group, 'MARKETING & TRADING ,RESEARCH & DEV*T FEEDSTOCK SUPPLY'), 'COMMERCIAL OPERATIONS' , Group)

Not applicable
Author

Hi sunindia‌‌

Although the script works, it still doesn't group it to the COMMERCIAL OPERATIONS string.

sunny_talwar
MVP
MVP

Can you share a sample?

Not applicable
Author

Hi sunindia,

as requested.

sunny_talwar
MVP
MVP

See if this helps:

If(WildMatch(Group, 'MARKETING & TRADING ,RESEARCH & DEV*'), 'COMMERCIAL OPERATIONS', Group) as Group

senpradip007
Specialist III
Specialist III

PFA and reload the app; check with "NewGroup" field. Hope it will help you.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

If(Match(

Category,

'MARKETING & TRADING ,RESEARCH & DEV' & chr(39) & 'TFEEDSTOCK SUPPLY')  , 'COMMERCIAL OPERATIONS', Category) AS Group

Sample Load Script:

LOAD

*,

If(Match(

Category,

'MARKETING & TRADING ,RESEARCH & DEV' & chr(39) & 'TFEEDSTOCK SUPPLY')  , 'COMMERCIAL OPERATIONS', Category) AS Group

INLINE [

Category

"MARKETING & TRADING ,RESEARCH & DEV'TFEEDSTOCK SUPPLY"

Test1

Test2 ];

Regards,

Jagan.

timanshu
Creator III
Creator III

Hi Jarlee,

Write this :

This works precisely.

if(WildMatch(Group, 'MARKETING & TRADING ,RESEARCH & DEV'&chr(39)&'T'&chr(10)&'FEEDSTOCK SUPPLY', )  , 'COMMERCIAL OPERATIONS' , Group)

as there is a problem with this actual value.  after DEV'T , there is a new line. So write above expression for this.

Find app attached.

Not applicable
Author

hi sunindia its working now thanks.