Merge and calculate rows grouped by a term

Hi folks!

I have a table produced displaying result from two queries, both grouped by two term columns (A, with a numerical value and B with two different string values, in my example below). Is there a way to further group/merge the result?
I would like to end up with a new table with two columns:
A (the numerical string value) and B (a calculated value based on dividing the two values in C).

For the sake of clarity (and for a chance that any of you understand me :slight_smile: ), I’m giving you the example:

Basically I would like to produce the following table:
| A | B |
| 31463 | 1.16 |
| 31461 | 0.33 |

Is it possible or do I have to rethink/use another visualizer?

Regards,
Magnus