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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Solution

Accepted Solutions
Miguel_Angel_Baeyens
Support
Support

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
Support
Support

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 II
Champion II

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.