Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Not a Qlikview developer, I've the formula working in excel but cant quite get it right in QV Not sure if QV has something similar to the "search" formula in excel?
=RIGHT(B2,LEN(B2)-SEARCH(" ",B2,SEARCH(" ",B2,1)+1))
Thanks a lot in advance and happy christmas
Dan
Try subfield(B2,' ', -1)
And the equivalent of Excels Search() function is the Index() function.
Try subfield(B2,' ', -1)
And the equivalent of Excels Search() function is the Index() function.
Mid(B2,Index(B2,' ',2)+1)
This answer replicates exactly my excel formula, however I realised my formula in excel wasn't working correctly for some cases.
Gysbert's formula worked better for me.
Thanks both!!
Can you post any example here.
Regards
Anand
hi Daniel,
if it is just trimming last few spaces then you can use rtrim() function, this will remove spaces from right side of the string.
Regards
Saurabh
I have a field that contains information like this:
AB Leichire Heah POS0953 |
I only need the last part (POS0953) to create a new field with it.
The suggested by Gysbert works beautifuly:
subfield(B2,' ', -1)
Regards,
Dan
please mark Gysbert's answer correct.
thanks
regards
Marco
Yes Gysbert is right
for pick last right value from AB Leichire Heah POS0953
you have to use subfield(B2,' ', -1)
Similary if you want last second then use subfield(B2,' ', -2)
Similary if you want last third then use subfield(B2,' ', -3)
Regards
Anand