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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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
Partner - Master II
Partner - Master II

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

View solution in original post

MarcoWedel

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

 

 

View solution in original post

10 Replies
BrunPierre
Partner - Master II
Partner - Master II

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
Partner - Master II
Partner - Master II

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
Partner - Master II
Partner - Master II

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
Partner - Master II
Partner - Master II

Have you tried this yet?

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


BrunPierre_1-1681225027012.png

MarcoWedel

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