Hi Rafael,
Your posted your problem but without the SQL and what is behind your calculation we can't help you.
Just a guess, check if you are joining tables without link all proper key fields. This can lead to this behavior with a cartesian resultset.
Regards, Fernando Da Rós