Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

edifiayo
Contributor

Extracting numeric values from a string

Hi dear all,

 

I have a colum with the following values

 

customer number.JPG

I want to keep just the number after the slash. keep it mind that the characters before the slash '/' could take values likes X15, X01, X16 .. and so on..

 

Any idea?

 

Thanks!

Tags (1)
5 Replies

Re: Extracting numeric values from a string

May be this

SubField(Customer_Sold_To, '/', -1) as Number
Highlighted
edifiayo
Contributor

Re: Extracting numeric values from a string

Hi Sunny,

 

Unfortunately it does not work for all  😕

 

customernumber2.JPG

thanks in advance

Re: Extracting numeric values from a string

Is Customer_Sold_To a field or expression here?

edifiayo
Contributor

Re: Extracting numeric values from a string

It is a field...

 

I shoudl mention also that I have row like this "D-HPMT-1077805" in that field...

Re: Extracting numeric values from a string

Would you extract 1077805 from this?

Also, do you have Customer_Sold_To coming from multiple tables? Did you apply the below code everywhere?

SubField(Customer_Sold_To, '/', -1) as Number