Discussion Board for collaboration on QlikView Scripting.
Hi there, I have a field (called GROUP) containing multiple strings like this one:
and so on.
I don't always have the same number of substrings (divided by the '/'), sometimes there are more than 5 and sometimes less than 5.
I'd like to remove from these strings the last subfield, intependently of the number of substrings.
Has anyone any clue about how could I get this done?
As long as you have at least two substrings this should work for you
View solution in original post
use the formla: =SubField('Group1/Group2/Group3/Group4/Group5','/',-1)it retreives the last subfield after the defined character from right (defining -1)
instead of hardcoded text use your data field
Thanks, but that's not what I'm looking for, I wanted to keep the rest of the string, not the last one.
Thank you, it worked perfectly!
I was assuming it had to do with the Index function.