I understand that you can't share a workbook. With questions like these the answer is usually very specific to the structure of the data, so it is hard to give you an answer or any help without one.
Nothing looks wrong with your calculation. As a next step, can you make a view that has columns for [DISCRETE INGREDENTS], [Coste de los ingredientes], TOTAL([Coste de los ingredientes], and (IFNULL(([Coste de los ingredientes])/TOTAL([Coste de los ingredientes]),0)
If you can take a screenshot of that view and share it with us, we can get more of an idea of where the calculation is going wrong.