Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tarynnagel
Contributor II
Contributor II

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
Specialist II
Specialist II

maybe this

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

ali_hijazi
Partner - Master II
Partner - Master II

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

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

MarcoWedel

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