For integers displayed within a Single Value panel, Sumo Logic will always attempt to display 3 digits. So if the number displayed is less than 100 you will see a decimal place added to the number.
For example, the chart value for the following query is showing with decimals.
| count as count by status_code
If you do not want to see the decimals you will need to convert the integer value to a "String" type within your query. For example
| count as count by status_code
| tostring(count) as count
Comments
3 comments
But if it's an integer, why show it as a decimal?
I've got this Single Value Viewer, which will only ever be an integer:
I don't want to convert to a string because then I can't use the Colours by Value Range feature, which is very handy on a dashboard.
Any plans to let us choose the number of decimal places to show?
Moreover the aggregate functions cannot be plotted as graph if it is not a number. So please suggest a viable solution if I want to show only 2 decimals.
I did the below but now it is not showing me it as graph:
If I add the below (to the above):
then it enables the graphing option (like chart) but it displays the trailing 3 zeros, which I do not want
Any suggestion?
Format allows you do specify the decimal places you want. To eliminate decimal places, format the output with zero decimal places...
If you want two decimal places, then...
Please sign in to leave a comment.