Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Obsyky
Contributor III
Contributor III

Right returns nothing

Hello,

I have a problem with the right method which returns nothing.
To understand, here is my input table :

VALUE
A15
B0
C85
F1
G89

 

What I would like to find as a table after:

LETTER NUMBER
A 15
B 0
C 85
F 1
G 89

 

For this use :

 

VALUELETTER:
LOAD
Left(VALUE,1) as LETTER,
If(Len(VALUE) > 2,Right(VALUE,2),Right(VALUE,1)) as NUMBER
Resident TABLE

 

 

With this code I get this :

LETTER NUMBER
A 15
C 85
G 89

 

Why right returns nothing when the length is two ????

Thanks !

Labels (1)
11 Replies
Obsyky
Contributor III
Contributor III
Author

Okay. I just added Text() so that it won't be considered as a number:

text(if(Len(VALUE)>0,Right(VALUE,len(VALUE)-1))) as Number

MarcoWedel

You don't need the Right() function at all in this case:

 

MarcoWedel_0-1656709218170.png

 

table1:
Load *,
     Left(VALUE,1) as LETTER,
     Text(Mid(VALUE,2)) as NUMBER
Inline [
VALUE
A1
A01
A15
B0
C85
F1
F01
G0
G1
G2
G01
G02
G89
];