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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trim dynamic string

I have a string which can be in the form of

1.1.5 or 16.25.7 or 100.444.111

I don't want anything after the 2nd decimal inclusive.

meaning expected output for the above example is

1.1, 16.25 and 100.444

I cant use left() because I don't know the exact format  which can be any of the above 3 formats. thank you

Labels (1)
1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

This will return everything up to (and not including) the second period:

=Left(yourString, Index(yourString, '.', 2) - 1)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein