Ad Widget

Collapse

Two decimal places

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • filips
    Junior Member
    • Sep 2022
    • 1

    #1

    Two decimal places

    Hello, I try to convert some value but no luck. By snmp I get value 999 in minutes, then I use custom multiplier option with 0,0167 parametr, then I get 16,6833. Now I wannt to print a variable with two decimal places, 16,68.
    I try to use trigger with round formule but no luck. I get an problem status.
    expression : round(last/UPS_template/public),2)
    Can someone help me ?
  • EliasHK
    Junior Member
    • Oct 2024
    • 2

    #2
    look at this :


    Code:return parseFloat(value).toFixed(2);
    Code:return Math.round(parseFloat(value) * 100) / 100;

    i used on item > pre-process "java script"

    Comment

    • EliasHK
      Junior Member
      • Oct 2024
      • 2

      #3
      like that Click image for larger version

Name:	image.png
Views:	498
Size:	41.0 KB
ID:	492870
      original item was LOG , then after preprocess i selected "Numeric" so i can see a graph with increasing value

      Comment

      Working...