Dashboard table panel decimal rounding?

Comments

4 comments

  • Avatar
    Harinder Bhandari

    Hi Cameron,

    Since it needs more investigation, It would be best if you open a support ticket with Sumo Logic providing the dashboard and panel name. we will help you with the solution.

     

    Thanks,

    Harinder

    1
    Comment actions Permalink
  • Avatar
    Harinder Bhandari

    You can use the format operator. Search for "format" operator in Sumo Logic documentation.

    1. Use the "format" operator to reformat the values. For example

    | 5.2342234 as val
    | format("%.3f", val) as val

    However this will again simply drop the last x number of digits and does not round these up/down to the proper decimal, so this could lead to some inaccuracy.

    2. A more precise way to get the decimal spaces is to use the round operator along with the format operation.

    | | 5.2342234 as val
    | val*100 as val
    | round(val)/100 as val
    | format("%.3f", val) as val

    0
    Comment actions Permalink
  • Avatar
    Cameron Besse

    Hi Harinder,

    Thanks for your reply.  I actually tried the format operator as well as the round operator, and neither seems to affect the number of decimals displayed in the table...  The result from the query is correct, but the table still displays 0-2 decimal digits depending on trailing zeroes.

    0
    Comment actions Permalink
  • Avatar
    Cameron Besse

    Thanks, I've opened a ticket.  I just wanted to make sure it wasn't user error first.  :P

    0
    Comment actions Permalink

Please sign in to leave a comment.