Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

vinay_bangari
Valued Contributor III

how to append zero in the front of the data of the feild

i have delivery number . And this delivery number sometimes will have 9 digits , 8 digits or 7 digits. But i want the end column data should have as 10 digits with zeros in the front .

For example if i have

1234567--- output:  0001234567

12345678-- output: 0012345678

1234567891--- since it is 10 digits it should not change.

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: how to append zero in the front of the data of the feild

If it is text, try

=num(num#(field),'0000000000')

9 Replies
Employee
Employee

Re: how to append zero in the front of the data of the feild

NUM(field,'0000000000')

MVP
MVP

Re: how to append zero in the front of the data of the feild

=num(12345678, '0000000000')

=num(yourfield, '0000000000')

or here

1.png

vinay_bangari
Valued Contributor III

Re: how to append zero in the front of the data of the feild

when i tried this . I am getting null values. Do you think because the format of the field is in text format.

vinay_bangari
Valued Contributor III

Re: how to append zero in the front of the data of the feild

Thank you Massimo. But i am getting null values. Let me attached the QVW file.

Employee
Employee

Re: how to append zero in the front of the data of the feild

=right('0000000000'&field,10)

mov
Esteemed Contributor III

Re: how to append zero in the front of the data of the feild

If it is text, try

=num(num#(field),'0000000000')

vinay_bangari
Valued Contributor III

Re: how to append zero in the front of the data of the feild

@michael Solomovich Thank you . thanks for your help. And Massimo & Anjos thanks for your fast reply.

vinay_bangari
Valued Contributor III

Re: how to append zero in the front of the data of the feild

i have posted another question. Can you please help me with that.

how to display rolling 13 months in the line chart

vinay_bangari
Valued Contributor III

Re: how to append zero in the front of the data of the feild

i have posted another question can you please help me with that

how to display rolling 13 months in the line chart

Community Browser