Can I aggregate field values into rate?

I have a field with values recorded in bits, like

moduleA = 0x01
moduleB = 0x02

and one document would be recorded with values like:
{name:john, flowflag:1} msg run into module a
{name:foo, flowflag:2} msg run into module b
{name:bar, flowflag:3} msg run into module a&b

the question is,
how could I get a rate
msgs into A/msgs into B --> 95% ?

Thanks a lot...

If I'm understanding correctly, you'd like to take the number of documents which have {flowflag: 1} or {flowflag: 3} and divide it by the number of documents which have {flowflag: 2} or {flowflag: 3}, and create something like a metric visualization with the result. Is that correct?

Unfortunately, I can't think of a way something like this can be accomplished inside Kibana today, and perhaps not until there is some implementation of pipeline aggregations inside Kibana. The best you could probably do is to create two separate metric visualizations, each with the sum of the documents with the corresponding flowflag value, but you'd have to manually do the rate calculation. :-\

Yes, I would like to get visualization for
{flowflag:1} / ({flowflag:1} + {flowflag:2})

That is bad news, I think I have to manually calculate them myself.
Thanks a lot..

I think Timelion plugin for Kibana can do things like this? I'm not very experienced with it yet.