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

Getting numeric value from a field

Currently I have a field with data in the format: USD 7.50

I need to use the value in an equation, but am not sure how to isolate the numbers.

 

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Pleae share different number how you have, If you have for all values in the same format - can be fixed via this?

Num(Num#(SubField(Field, ' ', -1))) as FieldnNew

And then can be used Sum(FieldNew)

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

View solution in original post

3 Replies
Anil_Babu_Samineni

Pleae share different number how you have, If you have for all values in the same format - can be fixed via this?

Num(Num#(SubField(Field, ' ', -1))) as FieldnNew

And then can be used Sum(FieldNew)

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
Frank_Hartmann
Master II
Master II

Maybe like this:

num#(purgechar(YOURFIELD,'USD '),'##.##')
jorkington
Contributor II
Contributor II
Author

Can't test the solution rn, but all values are in the same format: USD ##.##

So hopefully this will work.