Issue with filtering on lookup field - nested tables


Using self_hosted Baserow 1.22.3.
I’m creating booking app for my company.
There are 3 tables:




I would like to know in clients table the amount per service client have already used.

My idea was to create formula field how_many_A, how_many_B, etc.

How to do that ?
Tried in many ways and nothing works…
Everything is in public tables listed above.

Can you help ?

Asking for help solves problem.

I figured it out.