Oh, I see. Long is an integer and therefore the fractional part is discarded. Right?
But when I convert the value to_double I get red cross in the rule source box when trying to devide.
What happens when you convert 1048576 to double?
rule “Bytes to Megabytes”
when
has_field(“Bytes”)
then
let mbyte = to_double($message.Bytes);
set_field(“MBytes”, mbyte / to_double(value:“1048576”));
end