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

How to remove unwanted specific Text with in the column fileds

Dear Experties,

I have a one querey regarding text remove with in the fields.Can anyone please help me out of this .

The column fileds  look like below :

--list box --

Type:

Type:

Business v1

Auto Payments v2

Business v2

Business v3

Auto Payments v1

Auto Payments v3

Direct Payments V1

Payments

Errors

I dont want to see any(either lower case  or upper case) 'V1' or 'V2'.......'Vx' . I want see like below


Type:

Business

Auto Payments

Direct Payments

Payments

Errors

Regards,

Sunny

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

If you have the freedom to patch in your script (instead of in the UI), you can use MapSubString to patch any string away. For example:

MapAwayVersions:

MAPPING

LOAD ' ' & IF (div(RecNo()-1, 10) = 0, 'v', 'V') & mod(RecNo()-1, 10) AS f1, '' AS f2

AUTOGENERATE 20;

RawData:

LOAD Type, MapSubString('MapAwayVersions', Type) as TypeCorrected INLINE [

Type

Business v1

Auto Payments v2

Business v2

Business v3

Auto Payments v1

Auto Payments v3

Direct Payments V1

Payments

Errors

];

produces this, and remains easily adaptable.

Remove unwanted text thread262752.jpg

Best,

Peter

[Edit] Added your extra check values Payments & Errors.

View solution in original post

9 Replies
m_woolf
Master II
Master II

if(upper(left(right(Type,3),2))=' V',left(Type,len(Type)-3),Type) as Type,

Anil_Babu_Samineni

For this data, you can do simple like below

=left(Type, len(Type)-2)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Thank you for your reply,it should work for my requirement but  i have a one doubt ,i dont want to any uppacase just i can consider lower cases in that case how do we approach .

extra fileds added :

Type:

Business v1

Auto Payments v2

Business v2

Business v3

Auto Payments v1

Auto Payments v3

Direct Payments V1

Payments

Errors

yoganantha321
Creator II
Creator II

HI,

As said by Anil it is working properly,

=left(Type, len(Type)-2)


I got the output as follows as your requirement

Screenshot_78.png

Not applicable
Author

Thank you Anil for your reply ,i have missing something in my reuqiurement.your logic should work my given requirements please check the below requirement as well:

Type:

Business v1

Auto Payments v2

Business v2

Business v3

Auto Payments v1

Auto Payments v3

Direct Payments V1

Payments

Errors

Not applicable
Author

Hi ,Can you please provide the logic for the below requirement as well

Type:

Business v1

Auto Payments v2

Business v2

Business v3

Auto Payments v1

Auto Payments v3

Direct Payments V1

Payments

Errors

Anil_Babu_Samineni

Even, this case his solution works. Can you share updated output because I gone thru your reply. Seems you need only to get for lower.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Peter_Cammaert
Partner - Champion III
Partner - Champion III

If you have the freedom to patch in your script (instead of in the UI), you can use MapSubString to patch any string away. For example:

MapAwayVersions:

MAPPING

LOAD ' ' & IF (div(RecNo()-1, 10) = 0, 'v', 'V') & mod(RecNo()-1, 10) AS f1, '' AS f2

AUTOGENERATE 20;

RawData:

LOAD Type, MapSubString('MapAwayVersions', Type) as TypeCorrected INLINE [

Type

Business v1

Auto Payments v2

Business v2

Business v3

Auto Payments v1

Auto Payments v3

Direct Payments V1

Payments

Errors

];

produces this, and remains easily adaptable.

Remove unwanted text thread262752.jpg

Best,

Peter

[Edit] Added your extra check values Payments & Errors.

Not applicable
Author

This is Also Correct