Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need your help to determine how to retrieve the position of a digit [1-9] within the first five characters of a string?
For Example:
Ex1:
001023456789 first digit other than zero is 1 and it is located at position 3
Ex2:
000123456789 first digit other than zero is 1 and it is located at position 4
Ex3:
0000123456789 first digit other than zero is 1 and it is located at postion 5
Ex4:
010123456789 first digit other than zero is 1 and it is located at position 2
Have you tried something like this:
=FindOneOf ('001023456789', '123456789')
OR
=FindOneOf ( Left(YourField, 5), '123456789')
Cheers,
DV
www.QlikShare.com
Have you tried something like this:
=FindOneOf ('001023456789', '123456789')
OR
=FindOneOf ( Left(YourField, 5), '123456789')
Cheers,
DV
www.QlikShare.com
Load
*,
FindOneOf(Left(Number,5),'123456789') as Digit
Inline
[
Number
001023456789
000123456789
0000123456789
010123456789
];
Deepak and Manish, thank you both. Both of your answers are correct. This function is exactly what I was looking for.
Please note that I cannot mark both answers as correct, because the selections boxes won't let me do it. but, again, I'm very grateful for your assistance and support.
NP at Robert. I'm glad you got want you were looking for!
Cheers,
DV