Discussion Board for collaboration on QlikView Scripting.
I am trying to cut the last part of the field that is the last instance of an underscore ("_"). For instance, I have a field with the 2 values below:
I want to cut the "_LAX" from the first example and the "_GB" from the second example. The result would then be:
Any help would be great. My difficulty here is that it cannot be hard coded such as left(field, len -3) as it could range from 2-5 characters that I'm trying to cut off.
Go to Solution.
Try: left(Field, index(Field, '_', - 1) - 1)
LOAD Left(Field, (Len(Field) - Len(SubField(Field, '_', (Len(KeepChar(Field, '_')) + 1))) - 1)) as [New Field],
LOAD * Inline
Thank you to both!