I have a value, expressed in bytes, being returned from an Azure Log Analytics query:
I want to convert this to megabytes and make it more human readable. In this case, "4.19 MB".
When I try to convert the byte value into megabyte, I can't seem to get KQL to add the desired precision of 2 places.
Tried:
RequestBodySize = strcat(round(RequestBodySize / 1000 / 1000, 2), ' MB')
but this results in "4.0 MB".
How do I get this value to correctly reflect a precision of 2?
EDIT 1:
format_bytes(RequestBodySize, 2)
returns "4 MB". No precision.- Same with `format_bytes(RequestBodySize, 2, 'MB')