Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm having a field which contains long values.
All of them start with an amount of tags that I want to remove since I do not want to see them in the report.
The length and the tags are always different.
All they have in common is that they end with "] " before the actual value that I need to see starts.
I never used the trim function and I'm wondering if it's somehow possible to say:
remove everything before and including "] " and display the rest only.
another option could be (in script or in chart)
Right(field, len(field) - index(field, '['))
Subfield(yourfieldname, ']', 2)
another option could be (in script or in chart)
Right(field, len(field) - index(field, '['))
had to add a space and use the closing brackets.. after that it worked. thanks Massimo.
The subfield() function can take a negative index, which counts from the right. (It's not clear in the doc). That's convenient for handling a variable number of delimiters.
=Subfield(yourfieldname, ']', -1)
So
=SubField('[tag1][tag2]mydata',']',-1) = 'mydata'
-Rob
another one:
Mid(Field, Index(Field, '] ')+2)
just because QlikView offers so many possibilities;-)
regards
Marco
Or
TextBetween(Field&'@','] ','@')
Although I find the already proposed subfield() solutions most intuitive.
regards
Marco