Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to format string to number

Hi,

I have a excel sheet with a number format in a column as following '00.000.000/0000-00'.

How can I format this into 00000000000000 in Qlikview?

I am using this field to associate with another table.

I look forward to your help.

Best regards,

Jorge

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Jorge,

Use the PurgeChar() function along with the Num() function:

Num(PurgeChar('00.000.000/0000-00', './-')) AS Number

The second parameter in PurgeChar() may be any other non numeric character.

Hope that helps.

Miguel

View solution in original post

4 Replies
Miguel_Angel_Baeyens

Hi Jorge,

Use the PurgeChar() function along with the Num() function:

Num(PurgeChar('00.000.000/0000-00', './-')) AS Number

The second parameter in PurgeChar() may be any other non numeric character.

Hope that helps.

Miguel

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try with this

     Text(KeepChar(FieldName,'0123456789')) as NumberField

or

     Text(PurgeChar(FieldName,'./-')) as NumberField

Celambarasan

SunilChauhan
Champion
Champion

keepchar( '00.000.000/000000','0')

or

for field

keepchar( fieldname,'0')

hope this helps

Sunil Chauhan
Not applicable
Author

Thanks for the prompt reply. That was of a good help.