Your decimal place separator is a comma, you may need to change it to a full stop for num() to work. I have to, being in the UK. Your local preferences may allow you to work with the comma.
Also, using substr() will work only if all your parity values have the same number of digits. If the number of digits increases, it will crop the value, and if the number of digits decreases, the substr() will keep some of the USD characters and num() won't work at all. I suggest you use substitute() instead of substr() to replace "USD" by nothing, and replace "," by "."