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

Flag based on 2nd position in string

Hi All,

I want to create a flag field in the table based on below condition.

If there is NUMBER in the 2nd position of below values identify as 1, similarly if there is LETTER in the 2nd position, then identify as 0.

B11AY         //Number in 2nd postition from left, so flag it as 1.

BT476EJ    //LETTER in 2nd postition from left, so flag it as 0

 

Please help

Labels (1)
1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

try this:

Load *, if(isnum(right(left(Field,2),1)),1,0) as Flag;	
Load * Inline [
Field
B11AY
BT476EJ
];

View solution in original post

1 Reply
Frank_Hartmann
Master II
Master II

try this:

Load *, if(isnum(right(left(Field,2),1)),1,0) as Flag;	
Load * Inline [
Field
B11AY
BT476EJ
];