I need to to convert this field in to a number and remove the $ capacity_gb = $8,191.75, I've tried eval to num and convert, but nothing worked.
Hi
Try this
| makeresults
| eval capacity_gb = "$8,191.75"
| eval capacity_gb = replace(capacity_gb,"\$","")
@codedtech .
Try
|rex mode=sed field=capacity_gb "s/[^\d\.]//g"
If you need ,
also part of you value, just add ,
to the square bracket
To clarify, what do you get from | eval x = tonumber(capacity_gb) | table capacity_gb x
?
Yes, and the output is displayed like this:
capacity_gb x
$8,191.75