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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
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

Labels (1)
11 Replies
preminqlik
Specialist II
Specialist II

hi dhanu i think u need this

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

tresB
Champion III
Champion III

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