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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sra1bandi
Contributor III
Contributor III

How to add text and number zero's to ID number

Hi Team,

I have ID numbers

ID

1

2

4

5

4

6

7

.

.

10

.

.

2000

 

i want to show it as 

Before id i have to add Text as TNN00000

 

For example:-  ID 1 ====>  show as ====> TNN000001

                             ID 2 ==================> TNN000002

                             ID 10 =================> TNN000010

                             ID 111================> TNN000111

                            ID  1213================> TNN001213

 

IF the digits increased then we have to decrease the Zeros 

after TNN required six Numbers 

I have to show in ID value digit's increases then the zeros have to decreased as shown in the above example  

Thanks & Regards,

Sravan

 

Labels (1)
3 Replies
Lisa_P
Employee
Employee

Load using this:

'TNN'&Num(ID, '000000') as TNNID

vinieme12
Champion III
Champion III

you can take this  a step further 

Num(ID, 'TNN000000') 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Sra1bandi
Contributor III
Contributor III
Author

Thanks to both of you