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

Remove characters before :

I have Column - Data that has values in the format below

 

10/25/2015 : Agent1: This is the right value

05/11/2017 : Agent 56: Please change the report

I need to remove everything before the second ':' and only show the text in my output.

This is the right value
Please change the report

 

How do I do this in the expression or Script? I tried =Mid(Data, Index(Data, ': ')+2) but this only removes text before the first ':'

Labels (2)
2 Solutions

Accepted Solutions
BrunPierre
Master
Master

Trim(SubField(Field,':',-1))

View solution in original post

MarcoWedel

Mid(Data, Index(Data, ':', 2)+1)

 

 

View solution in original post

10 Replies
BrunPierre
Master
Master

Trim(SubField(Field,':',-1))

qlikwiz123
Creator III
Creator III
Author

Perfect, thank you!

qlikwiz123
Creator III
Creator III
Author

@BrunPierre  What if I only want to remove the string before the 1st two ':' and not check for more than two ':'?

BrunPierre
Master
Master

And what would that output be?

qlikwiz123
Creator III
Creator III
Author

05/11/2017 : Agent 56: Div2: Please change the report

 

In this case, the column has more than two ':'. The output should be 

Div2: Please change the report

BrunPierre
Master
Master

This will work in both instances.

TextBetween(Mid(Field,Index(Field,'Agent')),': ','')

qlikwiz123
Creator III
Creator III
Author

Sorry. My Bad. Maybe my question wasn't clear.

 

Original Value:

05/11/2017 : Agent 56: Div2: Please change the report

 

In this case, the column has more than two ':'. The output should be

Output: 

Div2: Please change the report

The output should only eliminate text/characters before the first two ':' occurrences and ignore from the third.

BrunPierre
Master
Master

Have you tried this yet?

TextBetween(Mid(Field,Index(Field,'Agent')),': ','')


BrunPierre_1-1681225027012.png

MarcoWedel

Mid(Data, Index(Data, ':', 2)+1)