Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

tarynnagel
Not applicable

Third last numeric character

Hi, I need to identify a specific number that matches to certain criteria. This criteria is that is must be 10 digits long and the third last number must be a three (3).

e.g.

123456789

1541162347

98765327

The second one should be a match and will return 'YES' in a new field.

Can anyone assist?

4 Replies
zhadrakas
Not applicable

Re: Third last numeric character

maybe this

if(len(FIELD) = 10 And Isnumeric(FIELD) AND mid(FIELD,8,1)=3, 'YES', 'NO') as NEW_FIELD

ali_hijazi
Not applicable

Re: Third last numeric character

if(len(your_field) = 10 and mid(right(your_field,3),1) = '3' and isNumeric(your_field),1,0)

I can walk on water when it freezes
MarcoWedel
Not applicable

Re: Third last numeric character

number like '???????3??'

MarcoWedel
Not applicable

Re: Third last numeric character

one example:

QlikCommunity_Thread_290685_Pic1.JPG

table1:

LOAD *,

    If(number like '???????3??','Yes','No') as Flag

INLINE [

    number

    123456789

    1541162347

    98765327

];

hope this helps

regards

Marco