I would need your calculation to amend, but I think you can manage it after the explanation.
The formula to add Tax to Amount is different from the one to extract it from Total. You will need to include both in your calculation in a If or Case instruction. Something like - If ( empty Amount field and not empty Total; extract; add ).
The problem was actually with a calculation I had in the Total field.
Once I removed it, it works fine. You are right, I will need to user some kind of if or case statement.
Thanks for you help.