Make gauge panel show absolute calculation instead of mean

Hello everybody,

I am using Grafana with Cloudwatch data source and a gauge panel, but I am having trouble to do something that, at least I think, that would be so simple.
I would like to know if it is possible to do something like this:

Query A: Query mode = CloudWatch Metrics, Namespace = AWS/Api Gateway, Metric Name = Count, Statistic: Sum, Dimensions <all the dimensions to get by specific api in /resourceA>, id = countA

Query B: Query a: Query mode = CloudWatch Metrics, Namespace = AWS/Api Gateway, Metric Name = Count, Statistic: Sum, Dimensions <all the dimensions to get by specific api in /resourceB>, id = countB

Query C: Query mode = CloudWatch Metrics, Namespace = AWS/Api Gateway, Metric Name = 5xxError, Statistic: Sum, Dimensions <all the dimensions to get by specific api in /resourceA>, id = e5xxA

Query D: Query mode = CloudWatch Metrics, Namespace = AWS/Api Gateway, Metric Name = 5xxError, Statistic: Sum, Dimensions <all the dimensions to get by specific api in /resourceB>, id = e5xxB

Query E: Math expression -> (e5xxA + e5xxB) / (countA + countB) * 100

Then, in the "Calculation"option, in grafana I have to set something, so I chose “Mean”

What Cloudwatch does (correct): Returns the total errors divided by the total count multiplied by 100: 99.29%

What grafana does (wrong, in my opinion): Makes the calculation above for every points, generates a list of percentages (something like [99.9, 98.9, 99.5…and so on]) and gets the mean, resulting in 99.45%. An imprecise number.

How to make Grafana behave like Cloudwatch?

Here is Grafana Gauge number

Here is Cloudwatch results for the same calculation:

I ensure I have filled all the queries exactly like they are in cloudwatch and still no luck

Does anybody know how to solve it?