Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
dhanu_today
Creator
Creator

How to apply 'Prefix'

Hi Everyone,

I have field SEC_ACCT_NO which contains more than 15 digits and less than 15 digits. We have to show last 15 digits for that am using the ‘RIGHT’  function to get the 15 digits only.But how we can put Prefix’Zeros’ which are having less than 15 gitits.

Is their any function available in QV like Lpad,rpad in oracle.

The same has been attached.

Thanks,

Dhanu

11 Replies
preminqlik
Specialist II
Specialist II

hi dhanu i think u need this

=num(right(trim(SEC_ACCT_NO),15),'000000000000000')

tresesco
MVP
MVP

Try:
If(Len(SEC_ACCT_NO)>0, Repeat('0',15-Len(SEC_ACCT_NO))&Right(SEC_ACCT_NO,15) ,SEC_ACCT_NO)  AS SEC_ACCT_NO_DERIVED