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: 
Not applicable

truncating data in a given string

Hi,

I have a field having data like this 876-1209 (c-BENlhnhg 9.l0./10)  and I want truncate the data after bracket begins and my output should be 876-1209

Can you pls let me know which function works, I tried using sub string but couldn't success.

Thanks,

1 Solution

Accepted Solutions
marcus_sommer

Try: subfield(YourField, '(', 1)

- Marcus

View solution in original post

3 Replies
marcus_sommer

Try: subfield(YourField, '(', 1)

- Marcus

eespiritu
Creator
Creator

Hi,

This is other option:  left(YourString,index(YourString,'(')-1)

Regards,

Enrique

Not applicable
Author

Thanks Marcus it is working as expected.

Thanks,