Formula to show percentage on gauge showing wrong values

Formula to show percentage or division on gauge showing wrong values

I have used below advanced json formula but its showing zero.
Please help and let me know the correct method to find percentage .

I need (sum of punctuality /count)*100

{
  "script": {
    "inline": "doc['punctuality'].value/100",
    "lang": "painless" 
  }
}

Any solution?

That is a scripted field, not a formula. The main difference is that with scripted/runtime fields you operate at each document level, while in formula it works at the aggregation level.

If you're looking to create a Gauge chart for a ratio ( A / B ) then you need to operate on a aggregation level. You might look into TSVB for that.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.