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

how to Eliminate /,.,- in particular field?

Hi Community,

how to eliminate /,-,. in the perticular field? i am used subfield and purgechar but not showing the actual output.

Example: i have field like Reason

Reason(field)

not there.

customer/not available

customer/call-rejected

rejected_calls.

my achivement is:

---------------------

Reason

not there

customernot available

customer call rejected

rejectedcalls

the above reasons i wanna eliminate /,-,_,.

when i use Subfield(Reason,'/') as Reason only eliminate '/'

and i used Purgechar also but only eliminate single '/'

How can i achive this?

1 Solution

Accepted Solutions
robert_mika
Master III
Master III

t1:

load * inline

[

Reason

not there.

customer/not available

customer/call-rejected

rejected_calls

];

final:

load

replace(replace(replace(Reason,'/', ' '),'_',' '),'-',' ') as reason

Resident t1;

drop table t1

View solution in original post

5 Replies
robert_mika
Master III
Master III

t1:

load * inline

[

Reason

not there.

customer/not available

customer/call-rejected

rejected_calls

];

final:

load

replace(replace(replace(Reason,'/', ' '),'_',' '),'-',' ') as reason

Resident t1;

drop table t1

awhitfield
Partner - Champion
Partner - Champion

Example Attached

simenkg
Specialist
Specialist

mapChars:

mapping load * inline [

From, To

/,

_,

.

];

Reasons:

load MapSubString('mapChars',Reason) as Reason

from reason......;

khasimvali85
Creator II
Creator II
Author

Hi Robert,

This is exactly i need the output.

Thanks.

Regards,

Khasim.

robert_mika
Master III
Master III

You are welcome