How to program dynamic calculation ?

How to program dynamic calculation ?

 

 I explain my problem :

I have a Project , containing Steps (Step A & Step B, for example).

My users declare activities on project belonging to step A or step B. These activities have a value of days (0.5 or 1 or more).

I would like to have an dynamic udate of the consumption consolidating all activities declared by step.

 

For example :

2 users declare activities on step A. 1 declare 3 (days). The counter of consumption for step A becomes "3". Then a second user declares 4 days on step A. Then the consumption becomes "7".

I do not see how to do this, I don't see how to start??

Any help welcom !

 

Fabien