Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Add trailing spaces to value

We need to add trailing spaces to values where the len() is less than 18.  Is this possible.

IF len([Profile Identifier]) < 18 

THEN

     add 18  - len(len([Profile Identifier])  SPACES to the end of the text([Profile Identifier])

As [Profile Identifier]

1 Solution

Accepted Solutions

Re: Add trailing spaces to value

Hi

Try like this,

IF(len([Profile Identifier]) < 18 , [Profile Identifier]&Repeat(' ',18-len([Profile Identifier])),[Profile Identifier])

Hope it helps

2 Replies

Re: Add trailing spaces to value

Hi

Try like this,

IF(len([Profile Identifier]) < 18 , [Profile Identifier]&Repeat(' ',18-len([Profile Identifier])),[Profile Identifier])

Hope it helps

Not applicable

Re: Add trailing spaces to value

Thank you!  that was perfect!!!

Community Browser