Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Remove zeros from field

Hi,

How to remove zeros from field.

Field values: 002,003,004,005,055,088,099.

Please let me know how to remove those zeros from backend.

Thanks..

9 Replies
annafuksa1
Creator III
Creator III

try

=SubField(Field , '0' ,-1)

annafuksa1
Creator III
Creator III

in a script

num(Field)

Not applicable

As anna mentioned used num(Feild) if you want to trim the starting 0's
Just in case if you want to don't have zeros at all use PurgeChar(Feild,'0')

Anil_Babu_Samineni

May be use, I am assuming you may need 2,3,4,5,55,88,99


FieldName * 1 as FieldName

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
TiagoCardoso
Creator II
Creator II

Hi, sorry for my bad english. I'm brazilian....

In your load script, try this:

PurgeChar([Your Field], '0') AS [Your Field]

In text box, try this too...

=PurgeChar('001230','0')

its returns '123'

As you can see, the function works in both script and expressions.

I hope it can be helpful.

tiagocardoso

jonas_rezende
Specialist
Specialist

Hi, nareshthavidishetty nareshthavidishetty.

Utilize the function num(). Example:

LOAD

num(FieldName)  as FieldName

From

<TableName.qvd>

(qvd);

Hope this helps!

Jonas Melo.

MarcoWedel

Hi,

you already received multiple correct answers when posting the same question a few weeks ago:

Trim zeros

Please describe the issue you are still having with the implementation.

If your question is answered however, then please close both threads related to this issue as well as your other threads that received correct answers:

Qlik Community Tip: Marking Replies as Correct or Helpful

thanks

regards

Marco

muthukumar77
Partner - Creator III
Partner - Creator III

Hi,

Use Num(Field)

Muthukumar Pandiyan
Chanty4u
MVP
MVP

or

keepchar(FieldName,'123456789')  as New;