Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
bsbernabe
Creator
Creator

how to use expression If change and insert the text with num

Hello There,

How can we change the text and insert a text including number Field value?

sample Datasource

Field
U123
123

 

=IF((left(text(Field,1) = 'U') then can change text to F in right like  123F , If(left(text(Field, 1), null)) then can insert R in righ like 123R?

I try so many expression but the result is not like this.

FieldShould be result
U123123F
123123R

 

Best Regards,

Bing

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like:

IF((left(Field,1) = 'U'), '123F' , If( Istext(left(Field, 1)) , '123R')) as NewCol

View solution in original post

3 Replies
tresesco
MVP
MVP

May be like:

IF((left(Field,1) = 'U'), '123F' , If( Istext(left(Field, 1)) , '123R')) as NewCol

bsbernabe
Creator
Creator
Author

Thanks but this is not the right solution See the attached file result to from expression.

 

 

tresesco
MVP
MVP

Try :

IF((left(Field,1) = 'U'), mid(Field,2)&'F' , If( IsNUM(left(Field, 1)) , Field&'R')) as NewCol