Scripted field with division does not show result

I would suggest the Visual Builder visualization.

Here's one post where we do a ration based on a filter;

But you need to sum specific values, so I think you need to do it a little different. This post uses the calculation aggregation;

Let me know if this works for you.

Regards,
Lee