Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am using Qlik Sense 1st time. I am trying to add text before number, which is not working.
I did tried Dual & right (Field -1) or
Text & right (Field -1). But I am getting out put as "-".
field1
T1000
T2000
T3000
T4000
I want output as Field2
T999
T1999
T2999
T3999
.......
try
Text(left(Field,1))&text(right(Field,len(Field)-index(Field,'T',1))-1)
Dear Dipesh,
you can use string functions.
LOAD *,
Left(field1,1)&''&(Mid(field1,2)-1) as field2
Inline
[
field1
T1000
T2000
T3000
T4000
]
;
Something like (this will preserve the first character
Left(field1, 1) & (Num(KeepChar(field1, '0123456789')) - 1)
or
Left(field1, 1) & (Num(Mid(field1, 2, len(field1))) - 1)
Try this also
LOAD *,
left(field1,1)&Text(right(field1,4)-1) as Newfield1;
LOAD * INLINE [
field1
T1000
T2000
T3000
T4000
];
Regards
Anand
This work perfectly, Thanks